MC Systems Insight
MC Power Technology Manager
MC RPG Developer
MC Power Developer
MC TNT Tips 'n Techniques
MC AIX Expert
MC Linux Expert
MC Mobile on Power
This Week @ the MC Press Bookstore

November 17, 2010 | Volume 9 Issue 22


TOP STORY: Format and Compile RPG to Use Embedded SQL
FEATURED ARTICLE: The API Corner: Removing Error Messages from the Job Log
NEWS HIGHLIGHT: 2010 iPulse Survey Results Reveal State of the IBM i Market and Top Independent Software Vendors
FORUM: Calculate Business Days Between Two Dates
BUYER'S GUIDE: WebSmart ILE and Barcode 400
Manage Subscription | Contact Us

Feature Article - Programming
Format and Compile RPG to Use Embedded SQL

Let's explore the nuts and bolts of using embedded SQL: file type, syntax, and compiling.

tom_snyderWritten by Tom Snyder

In a previous article, "Why Use Embedded SQL Within RPG?," I talked about why you would use embedded SQL in RPG. In this article, I will talk about how you could use embedded SQL within RPG. We'll start with an existing RPG program that is written with CHAIN and READ, and then we'll convert it to use embedded SQL.


Feature Article - Programming
The API Corner: Removing Error Messages from the Job Log

Now that we've figured out how to receive them, how do we remove them if we want to?

bruce_viningWritten by Bruce Vining

Last month, in "The API Corner: More on Message Handling," we looked at how to receive diagnostic messages (such as CPF3213 – Members for file more than maximum allowed) using the Receive Program Message (QMHRCVPM) API. The diagnostic message was needed in order to determine the underlying cause of an escape message (in our example, CPF7306 – Member not added) and then take the appropriate corrective action. The recovery action for CPF3213 was to change the file's MAXMBRS attribute to *NOMAX by using the Change Physical File (CHGPF) command and then adding the required member using the Add Physical File Member (ADDPFM) command. Both of these commands were run by the RPG application program using the Process Commands (QCAPCMD) API. However, after successfully adding the member, we noticed that the job log still contained the CPF3213 diagnostic message along with the two completion messages (CPC7303 – File SOMEFILE in library xxxxxx changed and CPC7305 – Member yyyyyy added to file SOMEFILE in xxxxxx) that were related to our handling of the initial CPF7306 error. Today's "API Corner" article looks at various options of how we can, if we want to, remove these messages.


In the News

Support MC Press - Visit Our Sponsors

Forums Sponsor



Search Sponsor