• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Ease the Burden of Overloading

    March 29, 2016 Ted Holt

    A while back I said that function overloading is marvelous. I haven’t changed my mind. The same is true of overloaded stored procedures. The only negatives to overloading are a couple of annoyances that the system requires to maintain order. Fortunately, those annoyances are easily circumvented. Here’s what and how.

    Assume a table of items. Each item is identified by a five-digit ID code for internal use only. Customers use an alternate catalog ID to refer to items.

    create table Items
       (    ID                    dec (5,0),
            Catalog_ID            char(6),
            MaterialThisLevel     dec (5,2),
            LaborThisLevel        dec (5,2),
            OverheadThisLevel     dec (5,2),
            MaterialLowerLevels   dec (5,2),
            LaborLowerLevels      
    …

    Read more
  • Finders, Keepers: Long Lost RSE Keyboard Shortcuts

    March 29, 2016 Susan Gantner

    If you have read many of my past Four Hundred Guru tips, you’ll remember that I write a lot about RSE (a.k.a. RDi) and particularly I write a lot about keyboard shortcuts. I’ve even created my own card with my favorite keyboard shortcuts. This tip is to confess that I’ve recently realized that I’ve been missing out on a set of shortcuts that I should have been using and including on my shortcut cards all along.

    I published a tip about a year ago about Playing with Blocks and I included an edited version of that tip on the back

    …

    Read more
  • Getting Started With IBM i And .Net XMLSERVICE Connectivity

    March 15, 2016 Richard Schoen

    In my last article I introduced you to XMLSERVICE for accessing IBM i data and discussed why you might want to consider using the XMLSERVICE .Net wrapper API to connect to and utilize live IBM i data from your .Net applications. In this article, I will cover an overview of XMLSERVICE and the .Net wrapper API I created for .Net developers to use IBM i data without needing to install IBM i access. You will also get a chance to do your first connectivity test to the IBM i using the XMLSERVICE for .Net API.

    Getting Started

    For this session

    …

    Read more
  • Dealing With A MIN/MAX Quirk

    March 15, 2016 Ted Holt

    The MIN and MAX functions have been a part of SQL since the beginning. A database-kind-of-guy-or-gal would think that anything so established would be stable to the point of boredom, but a database-kind-of-guy-or-gal would be wrong. MIN and MAX don’t even work the same way in all implementations of SQL, and to top it off, they have a quirk that I come upon occasionally.

    MIN and MAX began as aggregate functions. As such, they locate the minimum and maximum non-null values within a column across a set of rows. On this, everyone in the database world is in agreement. The

    …

    Read more
  • Generating An Insert Script From Existing Data

    March 15, 2016 Paul Tuohy

    I was recently presented with an interesting conundrum. Can you generate an INSERT statement for data that currently exists in a table?

    For example, let’s say a table contained the following data:

    EMPID NAME            GRADE BIRTHDATE  JOINEDDATE SALARY
    00001 Test             AA   1956-05-14 2001-10-10  0.00
    00002 Test2 - Has Null AA   null       null        null
    

    Could I generate the corresponding insert statement similar to the following:

    insert into TESTSTUFF/TESTEMP (EMPID, NAME, GRADE, BIRTHDATE, JOINEDDATE, SALARY) 
    values
    ('00001', 'Test', 'AA', '1956-05-14', '2001-10-10', .00),
    ('00002', 'Test2 - Has Null', 'AA', NULL, NULL, NULL);
    

    The original request was to generate an insert script for all

    …

    Read more
  • Retrieving Data From All Members With SQL

    March 1, 2016 Michael Sansoterra

    Note: The code accompanying this article is available for download here.

    Everyone knows that DB2 for i SQL doesn’t play well with legacy multi-member database files. The CREATE ALIAS statement allows SQL to access a particular member of a file. But what if you want to access all members in a file using SQL as though they were a single member? A reader recently inquired about this topic and further wanted to know if there was a built-in SQL function to return each row’s member name.

    NOTE: For clarification, I’m not discussing members of a DB2 partitioned table.

    Here

    …

    Read more
  • Easy Printing From CL

    March 1, 2016 Ted Holt

    CL cannot write to printer files. This is understandable, since CL fits into the category of job control languages. Even though I’d never use CL to build an aged receivables report, there are times when it is advantageous for a CL program to generate a report (i.e., produce a spooled file), and here are two fairly easy ways to do that.

    Suppose you have a CL program that runs three RPG programs in nightly batch processing. There are people in your organization who need to know whether these programs ran successfully or not. If you could build a short spooled

    …

    Read more
  • The Three Sources Of RUNSQLSTM

    March 1, 2016 Ted Holt

    The Run SQL Statements (RUNSQLSTM) command executes a file of SQL and/or CL commands. If you’ve used this command, you probably know that RUNSQLSTM reads the commands from a source physical file member. But did you know that there are two other places from which it can read SQL commands?

    First, the usual way. Here’s member LOADPLANTS in source physical file SCRIPTS.

    CREATE TABLE PLANTS (ID DEC(3), LOCATION VARCHAR(24),
       PRIMARY KEY (ID));
    INSERT INTO PLANTS VALUES
    (  1,  'Lost Angeles'),
    (  2,  'New Yolk'),
    (  3,  'Waste Virginia');
    

    To create the PLANTS table and initialize it with data, do this:

    …

    Read more
  • PHP Crash Course For RPG Developers

    February 23, 2016 Chris Ringer

    Suppose your boss tasks you with grabbing and processing some XML from an HTTP request to create a new customer order. If you have a “deer in the headlights” expression on your face, don’t fear, you don’t have to punt this request over the cubicle wall to the web developers. Without weeks or months of training, you can build a PHP script to retrieve the XML data that RPG can parse.

    What is PHP?

    PHP is a full-featured scripting language that runs on a web server. Just type your PHP code in a text editor (even Notepad), save it on

    …

    Read more
  • SBMJOB, CALL, And Decimal Parameters

    February 23, 2016 Ted Holt

    In spite of my great admiration for the IBM i operating system, I have to admit it has its idiosyncrasies. One of them, which has been there since Day 1, is the way the Submit Job (SBMJOB) command reformats decimal parameters of the CALL command. Fortunately, a relatively recent addition to CL provides an easy way to deal with this quirk.

    Assume a CL program calls an RPG program, passing along two decimal variables and a character variable.

    dcl  &Option       *char    1
    dcl  &Account      *dec     5
    dcl  &ThruDate     *dec     7
    
    call AR100R (&Account &ThruDate &Option)
    

    One day you are told

    …

    Read more

Previous Articles Next Articles

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18
  • Will The Turbulent Economy Downdraft IBM Systems Or Lift It?
  • How IBM Improved The Database With IBM i 7.6
  • Rocket Celebrates 35th Anniversary As Private Equity Owner Ponders Sale
  • 50 Acres And A Humanoid Robot With An AI Avatar
  • IBM i PTF Guide, Volume 27, Number 17

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle