Please enable JavaScript to view this site.

This is an OPTIONAL call to pass in the Header Key information for sequencing the output and also for pagination of the generated spooled file. Key call MUST come BEFORE the *HDR Header call.

The generated spooled file will be sorted by the selected Key Field(s) e.g. by Invoice number, Order number of whatever you have selected to paginate your output. If you don't want the order of the documents in your output to change you can generate your own Key Field 1 by using COBCOUNT to generate a unique key when the key changes in the original spooled file.

Parameter

In

Len

Comment

PARM1

Key Field 1

30

Keys making document unique - you may specify up to 3

PARM2

Key Field 2

30


PARM3

Key Field 3

30


PARM4

Blank, *HDR, *TRL, *BOTH

7

Detail Key Field 1 break line #1

PARM5

Blank, *HDR, *TRL, *BOTH

7

Detail Key Field 2 break line #1

PARM6

*KEY

7


Note #1: These two parameters [PARM4 & PARM5] determine whether or not a separate Detail line (and blank line) should be written when the corresponding Detail Key Field changes.  You may specify if the extra Detail lines should be written before the Detail Key Field change (*HDR), after (*TRL) or both (*BOTH).

Example:

StartKey 1:  <Detail Key Field 1 data>

StartKey 2:  <Detail Key Field 2 data>

<Detail Lines>

<Detail Lines>

EndKey   2:  <Detail Key Field 2 data>

StartKey 2:  <Detail Key Field 2 data>

<Detail Lines>

<Detail Lines>

EndKey   2:  <Detail Key Field 2 data>

EndKey   1:  <Detail Key Field 1 data>

 

Note: Information displayed between <> is variable data.