CONDITION Command

CONDITION Command

CONDITION condname
START (Traditional)
START (Record Format and XML)
{WHEN {CHANGE | [{EQ | NE | GT | GE | LT | LE} 'text']} 
  {BEFORE | AFTER} 
  {SUBPAGE (Traditional) | PAGE (Record Format and XML) | LINE} 
  {NEWFORM | NEWSIDE |
  {{CURRENT |=} | FIRST | {NULL | } | NEXT | COPYGROUP cgname} 
  {{CURRENT | =} | FIRST | {NULL | } | NEXT | PAGEFORMAT pfname}}}… 
[OTHERWISE 
  {BEFORE | AFTER} 
  {SUBPAGE (Traditional) | PAGE (Record Format and XML) | LINE} 
  {NEWFORM | NEWSIDE |
  {{CURRENT | =} | FIRST | {NULL | } | NEXT | COPYGROUP cgname} 
 {{CURRENT | =} | FIRST | {NULL | } | NEXT | PAGEFORMAT pfname}}] ;

START (Traditional)

START n LENGTH n [SPACE_THEN_PRINT {YES | NO}]

START (Record Format and XML)

{{START n LENGTH n} | 
{FLDNUM n [START { 1 | n}] [LENGTH {longest | n}]}

Short Form

CONDITION condname [START n][FLDNUM n] ;
CONDITION
The CONDITION command examines data in an input record and specifies actions to be taken based on the result of the examination.
  • The condname parameter must come before any subcommands.
  • No WHEN subcommand can follow an OTHERWISE subcommand in the same CONDITION command.
condname
Names the condition. The name must contain 1 to 8 alphanumeric characters.

PPFA allows cross-referencing to the condname. The cross-reference is done by using the short form of the CONDITION command. By specifying a previously defined condname, PPFA uses the specifications from that command. When the condition is reused, the point where you want the comparison to begin may be at a different point in the record. By specifying the optional START subcommand, you can change the starting point of the comparison but not the field length. If the START subcommand is not specified, the starting point is the same as defined in the original CONDITION command.

Note: When comparing text in fields that contain delimiters, the comparison text must not contain the delimiter. The delimiter is not part of the data.