Programming / CL


The CL Corner: Trying to Get a Handle on Your IFS? PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 25 February 2011 00:00

Still manually managing the IFS? Let's start looking at how to automate it instead.

bruce_viningWritten by Bruce Vining

Many companies, as they exchange information with other businesses, use communication methods such as FTP to send and receive various files. These files, often stored in the IFS of the i, then need to be managed (for example, periodically deleted) when the processing associated with them has completed. This type of file management unfortunately is done manually in all too many cases. This article is the first in a series looking at how you might automate some, if not all, of this management responsibility.

Last Updated on Friday, 25 February 2011 00:00
Read more...
 
User Rating: / 3
PoorBest 
The CL Corner: Still Copying Code Within a CL Program? PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 28 January 2011 00:00

Are you up to speed on IBM CL subroutine support?

bruce_viningWritten by Bruce Vining

In days long past, I used to copy small pieces of common code from one section of a program to another section. This common code might be validating input values from a user, adding X days to a date to determine a date in the future (or past), sending messages, or a wide range of other functions. I didn't want to duplicate this common logic to multiple locations within my program (especially if I might have to change the code in the future), but using GOTO to run common code and then trying to resume where I was prior to running the GOTO command can quickly become a real pain. Duplicating the code was often the lesser of the two evils. Thankfully, CL was enhanced awhile back (V5R4 to be specific) with support for subroutines. And in case you're thinking, "I know all about subroutines, I've been using them for years in RPG," I'll just caution you that CL subroutines have a few features that RPG subroutines don't. So don't stop reading just because you're familiar with subroutines in another language.

Last Updated on Friday, 28 January 2011 00:00
Read more...
 
User Rating: / 3
PoorBest 
The CL Corner: Reduce Those Annoying Substring Operations PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 19 November 2010 00:00

It's simple if you use *Defined storage.

bruce_viningWritten by Bruce Vining

A pet peeve of mine is going into a CL program to make some modifications and then encountering long sequences of Change Variable (CHGVAR) commands utilizing %substring operations in order to access, and then update, data stored in the local data area (LDA). The approach of using the LDA for program-to-program communication is, in many companies, done as an alternative to passing parameters to called or submitted programs. And over the years many of these companies have developed standards addressing how the LDA is laid out for this form of communication. Actual usage of the LDA, however, is often left to the individual developer in terms of implementation. In this article, we will review one possible approach to improve programming productivity when using the LDA.

Last Updated on Friday, 19 November 2010 00:00
Read more...
 
User Rating: / 5
PoorBest 
The CL Corner: Getting Your Commands Out to the World PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 29 October 2010 00:00

Learn about some additional capabilities related to user commands.

bruce_viningWritten by Bruce Vining

In the last article, "Need Some Help with That Command? Part II," we concluded our introduction to the User Interface Manager (UIM) as it relates to providing command help text for the command TRMLFTCHR. The complete source for the TRMLFTCHR panel group, which has only been published in pieces in past articles, is this:

Last Updated on Friday, 29 October 2010 00:00
Read more...
 
User Rating: / 1
PoorBest 
The CL Corner: Need Some Help with That Command? Part II PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 24 September 2010 00:00

Additional UIM capabilities provide more help text with user commands.

bruce_viningWritten by Bruce Vining

In the last article, "Need Some Help with That Command?", several User Interface Manager (UIM) tags related to the formatting of help text were introduced, including these:

Last Updated on Friday, 24 September 2010 00:00
Read more...
 
User Rating: / 1
PoorBest 
The CL Corner: Need Some Help with That Command? PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 27 August 2010 00:00

Provide help text for user commands.

bruce_viningWritten by Bruce Vining

This article is the seventh in a series related to creating user commands. The first five articles introduced how to define various command parameter features and then implement those features within the command's CL-based command processing program (CPP). Starting with the sixth article, "Providing Help Text for a User Command," we began looking at how to use the Generate Command Documentation (GENCMDDOC) command to provide a starting point for our help text. In this article, we will look at how to code User Interface Manager (UIM) text, which can be used to create and maintain our command help text.

Last Updated on Wednesday, 25 August 2010 10:17
Read more...
 
The CL Corner: Providing Help Text for a User Command PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 30 July 2010 00:00

It's easy with the GENCMDDOC command!

bruce_viningWritten by Bruce Vining

This article is the sixth in a series related to creating user commands. The first five articles introduced how to define various command parameter features and then implement those features within the command's command processing program (CPP). In this article, we will look at one way to provide online help for user-created commands. The approach we will review utilizes the Generate Command Documentation (GENCMDDOC) command, which is provided starting with V5R3 of the i operating system. The GENCMDDOC command is documented here and, as one of its options, can generate an output file containing an outline to be used for documenting a CL command.

Last Updated on Friday, 30 July 2010 00:00
Read more...
 
User Rating: / 1
PoorBest 
The CL Corner: Trim Multiple Leading Characters with TRMLFTCHR PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 25 June 2010 00:00

bruce_viningThis command can support an extensive list of trim characters.

Written by Bruce Vining

In the previous article, "Cut, Snip, Trim with TRMLFTCHR," we saw how the Trim Left Characters (TRMLFTCHR) command could allow the user to specify what leading character to trim when left-adjusting a character string value. Today, we will see what is required to have TRMLFTCHR trim any number of various leading characters from an input string of any length, left-adjust the remaining characters, and then pad the returned character string with blanks to its declared length.

Last Updated on Friday, 25 June 2010 00:00
Read more...
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 4 of 24

WHITE PAPERS

The following White Papers can be found at the MC White Paper Center

 

 


   MC-STORE.COM