Long Form Subcommands

START n
Read syntax diagramSkip visual syntax diagram
|--START--n-----------------------------------------------------|

Specifies the starting byte of the comparison field within the data record where the comparison is to be done.

n
Specifies the number of bytes from the first data byte in the record as the starting point of the comparison field. The first data byte position of an input record is 1.
Note: The carriage-control character and the table-reference character are not considered data.
LENGTH n
Read syntax diagramSkip visual syntax diagram
|--LENGTH--n----------------------------------------------------|

Specifies the length of the comparison field.

n
Specifies the number of bytes in the data record to be compared, beginning with the position specified in START. Valid values are numbers 1 - 8000. The length of the constant text must be the same as defined in this parameter or the results are invalid.

Comparisons are done on a byte-by-byte basis. Because the comparison field and the constant text must have the same lengths, padding is not necessary.

Note: If any part of the comparison field that is specified by the combination of START and LENGTH is outside the boundaries of the data record, no conditional processing is done. No WHEN is started. If an OTHERWISE is present, it is not started either.
FLDNUM (Record Format and XML only)
Read syntax diagramSkip visual syntax diagram
              .-START 1--.  .-LENGTH -longest-.   
|--FLDNUM--n--+----------+--+-----------------+-----------------|
              '-START--n-'  '-LENGTH -n-------'   

Field number to be used in comparison. This keyword is used only if the DELIMITER field was used in the LAYOUT command. Fields cannot be counted without specifying delimiters in the database. When fields are counted, the first field after the record ID is to be considered FLDNUM 1.

To identify a part of a field that is numbered, you can specify the starting position (from the delimiter) and the length of the field to be used in the WHEN condition (the default of the longest parameter is the length of the longest condition or when no specific condition is specified, it is from the starting position to the end of the field.)

SPACE_THEN_PRINT (Traditional only)
Read syntax diagramSkip visual syntax diagram
   .-SPACE_THEN_PRINT--YES-.   
|--+-----------------------+------------------------------------|
   '-SPACE_THEN_PRINT--NO--'   

Specifies whether ANSI carriage controls for spacing are enabled for the first record on the new logical page that follows the execution of the CONDITION command. The abbreviation of this command is SPACE.

YES
Specifies that the ANSI carriage-control character in the first print record of the new page is enabled for spacing. The spacing action that is specified in the carriage control is done after the eject to the new page. For example, if the carriage-control byte in the first record of the new page is a blank (skip one line before printing), then the first record skips the first line of the new page and prints at the second printline position.
NO
Specifies the ANSI carriage-control character spacing action is suppressed for the first print record of the new page. If this record contains a carriage-control spacing value, such as blank, 0, or , the spacing is ignored and the record prints at the first printline position on the new page. Channel code values are not ignored. If the first print record contains a valid channel code value of 1 - 9, or A - C, then the first record on the new page prints at the printline defined with that channel code.
Note: This subcommand is effective for print files that contain ANSI carriage controls. It is not used for data files that contain machine carriage controls, or a mixture of ANSI and machine carriage controls.
WHEN
Read syntax diagramSkip visual syntax diagram
   .----------------------------------------------------------------------------------------------------.   
   V                           .-BEFORE-.  .-SUBPAGE-.  .-NEWFORM-------------------------------------. |   
|----WHEN--+-CHANGE---------+--+--------+--+---------+--+---------------------------------------------+-+--|
           '-+-EQ-+--'text'-'  '-AFTER--'  '-LINE----'  +-NEWSIDE-------------------------------------+     
             +-NE-+                                     '-+-CURRENT or =  ---+--+-CURRENT or =  ----+-'     
             +-GT-+                                       +-FIRST------------+  +-FIRST-------------+       
             +-GE-+                                       +-NULL or ⁄--------+  +-NULL or ⁄---------+       
             +-LT-+                                       +-NEXT-------------+  +-NEXT--------------+       
             '-LE-'                                       '-COPYGROUP cgname-'  '-PAGEFORMAT pfname-'       

Marks the start of the conditional comparison parameters. At least one WHEN subcommand is required.

comparison type
Specifies the type of comparison that is to be done between the data in the comparison field (the portion of the record that is specified by START and LENGTH) and the constant text that is defined in the text parameter.
The values are:
EQ
Equal to
NE
Not equal to
GT
Greater than
GE
Greater than or equal to
LT
Less than
LE
Less than or equal to
text
Specifies constant text for comparison with the comparison field text. The constant text length must be the same as the value on the LENGTH subcommand, with a maximum length of 8000 bytes. Examples of valid text are:
2C(3)'AB'
K'321,400'
X'41FE7799' 2 'CHARS'

Any values or parameters that are valid for the TEXT subcommand within the FIELD command can be used as text.

CHANGE
Specifies that the contents of the comparison field in this record are to be compared with the field in the record last processed by the same CONDITION command.

This parameter is an alternative to the comparisontype and text parameter combination but can be specified only once in a CONDITION command.

The result of the comparison is either TRUE or FALSE.
TRUE
When the contents of the comparison field change from one record to the next.
FALSE
When the print server processes the data, if the comparison field lies outside the boundary of the current record, which might occur with variable-length records or with truncated trailing blanks, the current record is not used in future comparisons.

CHANGE is always false if used with the first WHEN subcommand of a series (no previous record to compare against). Whenever a new data map (one with a different name) is invoked, all the CHANGE comparisons are reset. Field values in the previous data map are not retained.

BEFORE
Specifies that the conditional action takes place before the current line or subpage is processed. This is the default.
AFTER
Specifies that the conditional action takes place after the current line or subpage is processed.
LINE
Specifies that the conditional action takes place either before or after the current line.
SUBPAGE (Traditional only)
Specifies that the conditional action takes place either before or after the current subpage. Between LINE and SUBPAGE, SUBPAGE is the default.

For a description of subpages, see Logical Page.

PAGE (Record Format and XML only)
Specifies that the conditional action takes place either before or after the current page. This is the default. Between LINE and PAGE, PAGE is the default.
Note: For CONDITION commands in a Record Format or XML page definition, the keyword SUBPAGE is acceptable but obsolete. Record Format and XML page definitions do not have subpages.
NEWFORM
Specifies that the only action to be taken is skipping to the front of a new form (sheet) and restarting the page format.
Note: This parameter is an alternative to using the COPYGROUP and PAGEFORMAT parameters, and is equivalent to specifying CURRENT for the COPYGROUP parameter and NULL for the PAGEFORMAT parameter. CURRENT NULL are the respective defaults for COPYGROUP and PAGEFORMAT parameters; therefore, NEWFORM is the default action.
NEWSIDE
Specifies that the only action to be taken is skipping to a new side (either the back of the current sheet or the front of a new sheet) and restarting the page format.
Notes:
  1. This parameter is an alternative to using the COPYGROUP and PAGEFORMAT parameters, and is equivalent to specifying NULL for the COPYGROUP parameter and CURRENT for the PAGEFORMAT parameter.
  2. Conditional processing does not result in unnecessary blank pages.
If the line currently being processed is the first line on a side, then:
  • A COPYGROUP or NEWFORM action that takes effect BEFORE LINE does not force an additional new form.
  • A PAGEFORMAT or NEWSIDE action that takes effect BEFORE LINE does not force an additional new side.

Similarly, additional sides or forms are not forced by BEFORE SUBPAGE if the line currently being processed is in the first subpage on a side or a form.

copygroup options
Specifies a copy group to be invoked if the condition is true.
Note: Any copy group action (except NULL) restarts the page format.
{ CURRENT or = }
Invoke the current copy group again. This results in ending printing on the current sheet and resuming on the front side of a new sheet. This is the default.
The page format is restarted, which means that the first input record to go on the new page is printed with the first PRINTLINE command of the current page format. For example, data that is to be printed as subpage 4 on the sheet might be printed on subpage 1 on the new sheet.
Note: The character = can be used for CURRENT.
FIRST
Invokes the first copy group in the current form definition.
{ NULL or ⁄ }
Retains the current copy group, taking no action. The character ⁄ can be used for NULL.
NEXT
Invokes the next copy group in the current form definition.
Note: If NEXT is specified from the last copy group in the form definition, the first copy group in the form definition is used.
COPYGROUP cgname
Uses the named copy group that is defined in the current form definition. The name must contain 1 - 8 alphanumeric characters.
pageformat options
Specifies a page format to be invoked if the condition is true.
{ CURRENT or = }
Invokes the current page format again. This results in ending printing on the current sheet and resuming on the front side of a new sheet.

The page format is restarted, which means that the first input record to go on the new page is printed with the first PRINTLINE command of the current page format.

The character = can be used for CURRENT.

FIRST
Invokes the first page format in the current page definition.
{ NULL or ⁄ }
Retains the current page format, taking no action. The character / can be used for NULL. This is the default.
NEXT
Invokes the next page format in the current page definition.
Note: If NEXT is specified from the last page format in the page definition, the first page format in the page definition is used.
PAGEFORMAT pfname
Uses the named page format that is defined in the current page definition. The name must contain 1 - 8 alphanumeric characters.
OTHERWISE
Read syntax diagramSkip visual syntax diagram
|--+-------------------------------------------------------------------------------------+--|
   |                        .-PAGE----.                                                  |   
   |            .-BEFORE-.  +-SUBPAGE-+  .-NEWFORM-------------------------------------. |   
   '-OTHERWISE--+-AFTER--+--+-LINE----+--+---------------------------------------------+-'   
                                         +-NEWSIDE-------------------------------------+     
                                         '-+-CURRENT or = ----+--+-CURRENT or = -----+-'     
                                           +-FIRST------------+  +-FIRST-------------+       
                                           +-NULL or ⁄--------+  +-NULL or ⁄---------+       
                                           +-NEXT-------------+  +-NEXT--------------+       
                                           '-COPYGROUP cgname-'  '-PAGEFORMAT pfname-'       

Marks the start of a conditional action that is taken if all preceding WHEN comparisons have proved false. The syntax is the same as the WHEN subcommand, except that the comparison parameters (comparisontype text or CHANGE) are not used. See the WHEN parameters that start with BEFORE for a description of the parameters.

If the OTHERWISE subcommand is not used within the sequence, no action is taken. This action is the same as if an OTHERWISE NULL NULL is entered.

Note: OTHERWISE is not started if any part of the comparison field that is specified by the combination of START and LENGTH is outside the boundaries of the data record.