Midrange News for the IBM i Community


CLEDIT Command Published by: Bob Cozzi on 28 Aug 2012 view comments

CLEDIT - Edit Numeric Variables in CL

The CLEDIT command allows the CL programmer to convert a *DEC or *INT variable into text by applying an editcode or editword to that numeric variable. This command works similar to the %EDITC and %EDITW built-in functions in RPG IV, but applies to CL programming.

Parameter Definition

RTNVAR - Specify a CL variable that will receive the edited result. This variable should be large enough to receive the entire result. Truncation will occur if the resulting text value is to large to fit into the CL return variable.

VALUE - Specify the numeric CL variable to be edited. This can be TYPE(*DEC) or TYPE(*INT) of any length. A literal value is not allowed for the VALUE parameter.

EDIT - Specify any standard 1-character Edit Code or any user-specified Edit Word. This edit is applied to the numeric value specified on the VALUE parameter and is returned to the CL variable specified on the RTNVAR parameter.

TRIM - Specify TRIM(*YES) to remove leading blanks from the left-side of edited result.

 

Availability

The CLEDIT along with the CLCASE and CLSCAN commands are included in the runtime and Developer Editions of COZTOOLS, available at www.cozTools.com

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS