AS400 Display File Field Description

Display File Field Description (DSPFFD) is a command to find out the field information in a file for use in database processing. With this command we can find out the file record format along with the name of the table field with its attributes. I use this command to get information when creating a program in database processing.

Continue reading AS400 Display File Field Description

AS400 CLP Using CAT/BCAT/TCAT

Combining the two character variables on the AS400 CLP can use CAT, TCAT or BCAT. Here are the details:

  • CAT – concatenates 2 strings according to variable length (as is).
  • TCAT – concatenates 2 strings by ignoring variable lengths and removing trailing blanks for the first variable.
  • BCAT – concatenates 2 strings by ignoring variable lengths, removing trailing blanks on the first variable and adding spaces between the two variables.
Continue reading AS400 CLP Using CAT/BCAT/TCAT

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.

Continue reading AS400 CLP Convert from Decimal to Character