• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Determine The State Of The Error

    September 13, 2016 Ted Holt

    The SQL Procedures Language (SQL PL) has an effective error-handling mechanism–condition handlers. When a statement returns a certain SQL state or a certain type of exception, the condition handler takes control. However, determining which SQL state to test for can be problematic. Here are two ways.

    Let’s start with a simple stored procedure.

    Create or replace procedure CreatePlants
    begin
       create table plants
       ( ID dec(3),  Location  varchar(16),
       primary key (ID));
    
       label on table plants is 'Plant master';
    
       insert into plants values
       (  1,  'Lost Angeles'),
       (  2,  'New Yolk'),
       (  3,  'Last Vegas');
    end
    

    What could go wrong? Well, the

    …

    Read more
  • Generate SELECT For All Columns

    September 13, 2016 Hey, Mike

    I have a table with a long list of column names and I want to build a SELECT statement from the catalog metadata. If I supply schema (library) and table (physical file) names, is there a way to generate a SELECT statement?

    —Four Hundred Guru Reader

    Thanks to dynamic compound statements and global variables, the answer is yes, it’s fairly easy to construct a SQL statement for a table or view as shown below:

    /* Build Select Statement and stuff it in QGPL.TEMPSQL variable */
    BEGIN
        -- Fill in your table/schema name
        DECLARE @TABLE_NAME   VARCHAR(128) NOT NULL 
                              DEFAULT 'SYSCOLUMNS';
    …

    Read more
  • The IBMer Who Decoded Bernie Madoff’s RPG

    September 12, 2016 Alex Woodie

    When Bernie Madoff’s massive Ponzi scheme collapsed in 2008, erasing $65 billion in supposed wealth, the midrange community was somewhat surprised to learn that an AS/400 was at the heart of the operation. Soon thereafter, FBI agents called Rochester, Minnesota, with a request for IBM: Give us an expert witness who can untangle the ancient RPG II code and explain how it works to a jury. That job eventually fell to longtime IBMer Rich Diedrich.

    Diedrich had worked in Lab Services since the early 1990s, back when it was called the Custom Technology Center. While Diedrich has expertise in

    …

    Read more
  • Micro Focus Embiggens Mightily With HP Software Buy

    September 12, 2016 Timothy Prickett Morgan

    Two years ago, Micro Focus started building out its software empire in legacy systems with the acquisition of the Attachmate conglomerate, a company that was bigger than itself at the time. And now, Micro Focus has done it again, this time by eating the bulk of the software that is currently owned by Hewlett Packard Enterprise, which has lost all urges to try to build a complete hardware-software-services stack like IBM used to have back in the 1990s and 2000s.

    HPE, which is the part of the Hewlett-Packard empire that includes the Four Ss of servers, storage, switching, and

    …

    Read more
  • IBM Updates Rational Developer With Mac OS, Other Goodies

    September 12, 2016 Timothy Prickett Morgan

    If you like creating applications in the Rational Developer for i integrated development environment, and you also like Apple Macs, then IBM has a release update for you.

    In announcement letter 216-143, Big Blue said that it was making the Mac OS client a peer to Windows and Linux machines with the V9.5.1 update to the RDi tool. To be ultra precise, RDi is now compatible with Mac OS X 10.11. IBM warns that some functions of RDi, such as program verifiers and syntax checkers, are not available on Mac OS, and it is not clear when or if

    …

    Read more
  • Ingenuity And Integration Meet In IBM i Data Warehouse

    September 12, 2016 Dan Burger

    It’s not uncommon for people to overlook the IBM i Power Systems platform when it is data warehouse project planning time. Laura Hamway sees things differently. Hamway is a consultant who works primarily with manufacturing companies running Infor‘s LX ERP systems, which most people refer to as BPCS, the name of the software before the Infor acquisition. She helps these organizations consolidate data from multiple systems, which allows a single, summary view. More analysis. Less inefficiency. Better business.

    There’s too much data for ease of use in transactional applications like BPCS, MAPICS, JD Edwards and other ERP software that

    …

    Read more
  • Howdy, Partner. Welcome To The IBM i Modernization Ranch

    September 12, 2016 Dan Burger

    The IBM i community is best known for its RPG programmers and its steadfast loyalty to a computing platform with blue-collar traits such as handling heavy workloads without a flock of nannies tending to its special needs. Behind the uncomplaining “workforce in a box” is a mix of application development environments and programs that are a combination of packaged products from the IBM midrange vendor community and home grown application handiwork.

    Software vendors have long relied on establishing business partners–resellers, integrators, and sources of referrals–to expand their sales channels. At the same time, organizations on the buying side of IT

    …

    Read more
  • Easy Printing from CL, Take Two

    August 30, 2016 Hey, Ted

    When I read your statement that CL cannot write to printer files, I immediately thought, “It can’t? Then what have I been doing for the last couple of decades?” I looked through the article and saw that it didn’t mention my most used method, and I wondered how it was missed.

    –Tom Liotta

    Tom takes advantage of one of the best features of ILE, namely the ability to bind routines written in different languages to form one program. The non-CL procedure that he included is the printf function, which is well-known to C programmers. Even though printf produces stream

    …

    Read more
  • Message Data Data Structures

    August 30, 2016 Hey, Ted

    Sending Escape Messages from RPG is a great article. Your program defines the message data parameter as 80 bytes of character data, but the IBM Knowledge Center defines MSGDTA as char(*) with notes saying it can be up to 32,767 bytes. I would like a variable longer than 80 bytes, but instead of coding 100 today, 120 next project, and so on, how could I code it to take full advantage of the API?

    –Glenn

    You’re right that the API can handle up to 32K of data, but you need only define MsgDta as large as you need it to

    …

    Read more
  • Getting Started With IBM i, .Net, and XMLSERVICE Remote Commands

    August 30, 2016 Richard Schoen

    Running CL commands and submitting batch jobs are great ways to use existing program functionality from a .Net desktop, web, or web service application. In this article we’ll focus on the XMLSERVICE remote command functionality. You’ll see just how easy it is to use XMLSERVICE to run programs or submit batch jobs on your IBM i systems.

    In this installment we’ll begin to tour the XMLSERVICEi .Net application code and samples, starting with the remote command call example. If you haven’t installed and set up the XMLSERVICE application code and created an Apache web server instance yet, please check out

    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • 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

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