Fully free statements in RPG AS400

Fully free-form statements in RPG AS400
Fully free statements in RPG AS400. all free rpg, rpg free format, **FREE, fully free rpg introduction, hwta, what is,about, explain,ibmi, as400, rpg
Fully free statements in RPG AS400

For writing Fully free RPG source statements we need to use special directive **FREE which indicates that the RPG source member contains fully free RPG code.

Directive **FREE can be specified in Column 1 of the first source line. The rest of the line must be blank.

The /FREE and /END-FREE directives are not allowed in fully free RPG sources. In fully free RPG sources, columns 6 and 7 have no special status. All columns must contain a free-format source, except for the compile-time data (CTDATA), file translation records FTRANS{(*NONE|*SRC), and alternate collating sequence records ALTSEQ(*NONE|*SRC|*EXT) which appear at the end of the source.

Fully free RPG source statements begin with the operation codes such as DCL-OPT, DCL-F, DCL-C, DCL-S, DCL-DS, DCL-PROC etc. In some cases, operation codes are not required such as EVAL, CALLP, DCl-SUBF, DCL-PARM are optional to use in free form RPG source. A free-form statement ends with a Semicolon.

For detailed information about each type of Freeform statement.

  • Free-Form Control Statement
  • Free-Form File Definition Statement
  • Free-Form Definition Statement
  • Free-Form Calculation Statement
  • Free-Form Procedure Statement
  • Conditional Directives in Fully Free RPG AS400

    We can use various conditional directives available such as /IF, /ELSEIF, /ELSE, and /ENDIF directives

      /IF DEFINED(V7R1M0)
         --code goes here and ends with semicolon.
      /ELSEIF DEFINED(V7R4M0)
         --code goes here and ends with semicolon.
      /ELSE
         --code goes here and ends with semicolon.
      /ENDIF
    

    Post a Comment

    © AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain