AS400 CLP How to Loop

I will discuss about using looping on AS400. If in other programming we can use the for, do-while or other functions. Looping on the CLP AS400 uses the LABEL function and IF function.

(more…)

Continue ReadingAS400 CLP How to Loop

AS400 CLP Convert from Decimal to Character

Converting value of an integer variable to a character is fairly simple. The simplest way is by displaying the value of a decimal using SNDPGMMSG. The SNDPGMMSG command can only display values from *CHAR variables, it needs to be converted from *DEC to *CHAR. The good thing, CLP can automatically convert only by using the CHGVAR (Change Variable) command.

(more…)

Continue ReadingAS400 CLP Convert from Decimal to Character