|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Friday, 28 May 2010 00:00 |
|
By adding new keywords to the command, you can trim any leading character.
Written by Bruce Vining
In the previous article, "Going Where No Substring (%SST) Operation Can Go," we saw what the Trim Left Characters (TRMLFTCHR) command can do through the use of pointers:
- Trim any leading zeros from a character string of any length that contains a non-negative numeric value
- Left-adjust the remaining value within the string
- Pad the string with blanks to its declared length
|
|
Last Updated on Friday, 28 May 2010 08:15 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Thursday, 29 April 2010 23:00 |
|
Use pointers to process variable-length character strings.
Written by Bruce Vining
In the previous article, "Support Variable-Length Parameters with Commands," we saw how the command processing program (CPP) of the Trim Left Characters (TRMLFTCHR) command could support character parameters of almost any arbitrary length that can be declared on a given release. Essentially, the CPP used the substring built-in, %sst, to process each byte of the input parameter while ensuring that each byte accessed was within the declared size of the input variable. Using %sst, however, introduced limitations in the CPP.
|
|
Last Updated on Thursday, 29 April 2010 23:00 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Wednesday, 14 April 2010 23:00 |
|
The newest version of CL offers enhancements in recovery, productivity, capacity, and serviceability.
Written by Bruce Vining
With all of the wonderful enhancements to Control Language (CL) in V5R3 (multiple files, DOxxx loops, SELECT, etc.), V5R4 (subroutines, structures, pointers, etc.), and V6R1 (CLOSE, INCLUDE, DCLPRCOPT enhancements, etc.), you may have wondered what IBM would deliver for CL in the IBM i 7.1 release. Well, it turns out that 7.1 certainly does have some great new features for the CL developer.
|
|
Last Updated on Wednesday, 14 April 2010 23:00 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Thursday, 25 March 2010 23:00 |
|
We continue our quest for reusable code with CL.
Written by Bruce Vining
In the previous CL Corner column, "Create Reusable Code," we created the TRMLFTCHR command. This command accepted a 10-byte character variable whose value was a numeric representation such as returned by the CHGVAR command when converting a TYPE(*DEC) CL variable, removed any leading zeros found in the numeric value, and returned the remaining character string left-adjusted and blank-padded. In this article, we will look at how to enhance the TRMLFTCHR command to support a CL character variable of virtually any length.
|
|
Last Updated on Thursday, 18 March 2010 11:42 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Friday, 26 February 2010 00:00 |
|
Are you creating commands to improve your productivity?
Written by Bruce Vining
This article is the first of several related to creating your own user CL commands. We will start with a simple command definition and then enhance the command with various features in order to demonstrate how to incorporate these extensions within your own commands. But first we need a command scenario.
|
|
Last Updated on Friday, 26 February 2010 00:00 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Friday, 29 January 2010 00:00 |
|
If you're still using IF/ELSE a lot, you need to get up to speed on IBM CL programming enhancements. Embrace SELECT, WHEN, and OTHERWISE.
Written by Bruce Vining
Are you still coding with the CL IF and ELSE commands? I continue to do so in some cases, but I find that with the introduction of several new CL commands in V5R3, my use of IF/ELSE is way down. The commands that I am referring to are SELECT, WHEN, OTHERWISE, and ENDSELECT. This article will bring you up to date on these "new" programming constructs.
|
|
Last Updated on Wednesday, 27 January 2010 15:12 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Ted Holt
|
|
Wednesday, 09 December 2009 00:00 |
|
Pointer variables, based variables, overlaid variables—do you know all the variable types and the right ways to use them?
Written by Ted Holt
Editor's Note: This article is an excerpt from the MC Press book Complete CL.
Variables are program data that are allowed to change values. They have names and are stored in memory for the duration of the program. Variables are of different types: character, decimal, signed integer, unsigned integer, logical, and pointer.
|
|
Last Updated on Thursday, 10 December 2009 09:48 |
|
Read more...
|
|
Programming -
CL
|
|
Written by Bruce Vining
|
|
Friday, 04 December 2009 00:00 |
|
Are you up on IBM file-related enhancements?
Written by Bruce Vining
In the course of recent user group presentations and discussions, I have been surprised by the number of CL developers who are unaware of IBM-provided CL file-related enhancements that have become available in the past few releases. In hindsight, it is possible that you may not have the time to review all new commands, new parameters on existing commands, and relaxed limitations for existing commands. The focus of this article will be getting you up to date on file-related CL enhancements that IBM made in V5R3, V5R4, and V6R1.
|
|
Last Updated on Friday, 04 December 2009 00:00 |
|
Read more...
|
|
|