Record Reprocessing Description and Processing

Record reprocessing is used when input records are processed according to one set of copy group and page format specifications, and then new specifications are invoked for the same input records. If the new specifications are to be applied using either the BEFORE SUBPAGE or the BEFORE LINE parameter, then the input records must be processed again using the new specifications instead of the original ones.
Note: Input records are not printed twice; record reprocessing just changes the specifications used when formatting the records.

The process is shown in the following diagram.

PPFA Commands Input Records
  • PAGEFORMAT PFMTA ;
  • PRINTLINE POSITION 1 IN 1 IN
  • DIRECTION ACROSS
  • REPEAT 5 ;
  • CONDITION cond1
  • START 2 LENGTH 1
  • WHEN EQ ’B‘
  • BEFORE SUBPAGE
  • NULL PAGEFORMAT PFMTB ;
  • PAGEFORMAT PFMTB ;
  • PRINTLINE POSITION 7 IN 1 IN
  • DIRECTION DOWN
  • REPEAT 5 ;
  • CONDITION cond2
  • START 4 LENGTH 1
  • WHEN EQ ’Y‘
  • BEFORE SUBPAGE
  • NULL PAGEFORMAT PFMTA ;
Input Records

Assume page format PFMTA is active. Under normal processing the first input record would print in the ACROSS direction, starting at a horizontal offset of 1 inch and a vertical offset of 1 inch. However, the third record satisfies the CONDITION statement and causes a new page format (PFMTB) to be started. Since CONDITIONcond1 specifies BEFORE SUBPAGE, the first two records must be reprocessed using page format PFMTB. As a result, all of the records are printed in a DOWN direction, starting at a horizontal offset of 7 inches and a vertical offset of 1 inch.

If allowed to operate without restrictions, record reprocessing could force PSF into an infinite loop. For example:

PPFA Commands Input Records
  • PAGEFORMAT PFMTA ;
  • PRINTLINE POSITION 1 IN 1 IN
  • DIRECTION ACROSS
  • REPEAT 5 ;
  • CONDITION cond1
  • START 2 LENGTH 1
  • WHEN EQ ’B‘
  • BEFORE SUBPAGE
  • NULL PAGEFORMAT PFMTB ;
  • PAGEFORMAT PFMTB ;
  • PRINTLINE POSITION 7 IN 1 IN
  • DIRECTION DOWN
  • REPEAT 5 ;
  • CONDITION cond2
  • START 4 LENGTH 1
  • WHEN EQ ’Y‘
  • BEFORE SUBPAGE
  • NULL PAGEFORMAT PFMTA ;
Input Records

As in the previous example, page format PFMTA is initially active, and input record 3 results in the selection of page format PFMTB. However, page format PFMTB has a condition that checks position four for the character ‘Y’, which is satisfied by input record 5. Therefore, if there were no restrictions, page format PFMTA would again be selected, the input data would be reprocessed (starting with input record 1), leading to an infinite loop.

To prevent this situation, after a BEFORE condition has been satisfied, all other BEFORE conditions are ignored until data has actually been formatted. See Record Reprocessing for detailed information on this restriction.