|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Friday, 26 June 2009 00:00 |
|
It's easy with the Retrieve Call Stack API.
By Bruce Vining
In our last column, "More-Flexible Testing of Your CL Program Error-Handling," we left the SNDESCAPE program with the limitation of our having to hardcode the name of the program being tested: MONESCAPE. Today, we will look at how to dynamically determine the program that we want to send an escape message to. We will do this by using the Retrieve Call Stack (QWVRCSTK) API, which is documented here.
|
|
Last Updated on Friday, 26 June 2009 00:00 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Friday, 05 June 2009 00:00 |
|
Use message replacement data along with the Command Analyzer Retrieve exit point.
Written by Bruce Vining
In our last column, "Testing Your CL Program Error-Handling," we looked at a rather simplistic SNDESCAPE exit program and noted several assumptions in how the program is written:
|
|
Last Updated on Thursday, 04 June 2009 13:42 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Wednesday, 22 April 2009 18:00 |
|
Register and use the Command Analyzer Retrieve exit point. By Bruce Vining I recently received a note from Phillip M., asking about the availability of APIs to aid in his testing of CL programs. In part, he says, "The commands generate CPF, BRM, and LNT message id's. I can't duplicate hardly any of the errors that will come up and I need to test the CL thoroughly before I put it into production. I really need the MONMSG command to pick up what I throw at it." Having had similar needs in the past--how to generate specific failure conditions for testing purposes--I can readily understand his need. And I suspect some of you reading this article feel likewise. Fortunately, there is a fairly easy way to accomplish his objective (assuming that your system is at V4R5 or later). |
|
Last Updated on Thursday, 28 May 2009 21:09 |
|
Register to read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Wednesday, 25 March 2009 18:00 |
|
Change commands with the Command Analyzer Change exit point. By Bruce Vining This article is the fourth in a series that discusses how to use proxy commands and the Command Analyzer Change exit point. In the last article, we reviewed the validation-checking that an exit program should perform prior to processing command-related data passed to the program. In this article, we will look at the actual processing of this command-related data. |
|
Last Updated on Thursday, 28 May 2009 21:17 |
|
Register to read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Thursday, 26 February 2009 18:00 |
|
Register and validate the Command Analyzer Change exit point. By Bruce Vining This article is the third in a series that discusses how to use proxy commands and the Command Analyzer Change exit point. In the last article, you saw the source for the Check for KILL exit program CHKKILL, but we had not had the opportunity to examine the program in detail. We'll start doing so now. |
|
Last Updated on Thursday, 28 May 2009 21:12 |
|
Register to read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Thursday, 06 November 2008 18:00 |
|
Did you know you could enhance the IBM "Work with" commands? By Bruce Vining Over the years, many users have asked for the ability to enhance IBM-provided displays. With V6R1, this is now possible with the commands Work with Output Queue (WRKOUTQ), Work with Spooled Files (WRKSPLF), Work with Job Spool Files (WRKJOB OPTION(*SPLF), and even the Status Print (D P) of the System/36 environment. While IBM continues to reserve numeric options such as 1 for send, 2 for change, 3 for hold, and so on, users can now define their own alphabetic options such as A for archive, E for email, F for fax, and so on. In this article, we will see how to add a new option, P (Print Next or Prioritize), to move a spooled report to the top of an output queue. |
|
Last Updated on Thursday, 28 May 2009 21:43 |
|
Register to read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Thursday, 02 October 2008 18:00 |
|
You can determine at run-time the size of a variable. By Bruce Vining I recently conducted a workshop on best programming practices when working with system APIs. One of the practices I recommend is to avoid hard-coding values such as variable lengths (or anything else for that matter) throughout the program. Assume for instance that you're calling a retrieve type system API that has four parameters as shown here: |
|
Last Updated on Friday, 03 October 2008 06:29 |
|
Register to read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Thursday, 31 July 2008 18:00 |
|
Have you tried using the C run-time date and time APIs? By Bruce Vining In the two most recent articles of this column (here and here), we have looked at the CEE date and time APIs and seen how easy it is, when working with Lilian seconds, to perform operations such as adding six hours to a time, comparing two time values, etc. without regard to the number of seconds in a minute, the number of minutes in an hour, and so on. This capability is not unique to the CEE APIs. It also exists with other APIs that are provided standard with your i operating system. Today, we will look at one such alternative set of APIs, the C language run-time functions--functions that you can also use from ILE CL. As a reminder, the task we are working on is to send an alert from one program (CHKLSTSND in the original article) when another program (SNDUPD) has not successfully run in over six hours. |
|
Last Updated on Thursday, 31 July 2008 06:42 |
|
Register to read more...
|
|
|