• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Installing PHP on Your Laptop

    March 29, 2016 Chris Ringer

    In my introductory article I walked you through a crash course in PHP. Now I will show you how obtain a free PHP development environment on your laptop in two easy installations of XAMPP and Netbeans. This allows you the freedom to configure PHP and test your scripts as you choose without affecting a production website or needing management approval.

    However, if you need to manage PHP scripts on an IBM i, you will want to alternatively explore using Zend Studio. This full-featured IDE integrates directly with the IBM i and allows you to write and debug scripts

    …

    Read more
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • XML-INTO And Optional Elements

    February 23, 2016 Hey, Jon

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

    I am working on an RPG program that does some very basic pre-processing of an XML document before passing it along to another program for final processing. Even though my program works, it fills up the job log with error messages. Can you help me get rid of them?

    The XML is structured like this.

     <Message>
      <Payload>
       <Event>. . . </Event>
      </Payload>
     </Message>
    

    The <Payload> element can contain a child element of <Event>, <Report>, or <Parameter>. Only one of these elements is ever contained in the message at

    …

    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

Previous Articles Next Articles

Content archive

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

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

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