Please enable JavaScript to view this site.
From v6.2.88 - ADVPREPAGE is a Cobwebb Exit program to pre-process the pagination for detail lines (*DET call) being passed to the Advanced Reformatting Utility (ADVRFMT). This can be useful if you have a varying number of lines for each specific Item in your spooled file and you want to keep / group them on the same page.
In the Cobwebb Design (PPD) where you wish to use this Exit program you must first have called the ADVRFMT Exit program with an *FIRST call to set up the configuration and open the files. Note: The Lines Per Page in the *FIRST call to the ADVRFMT in your design MUST be the same as the Lines Per Page in the *FIRST call to ADVPREPAGE.
This Exit program will try to write up to the maximum number of lines per page depending upon where the Page Throw parameter is Blank or *NOW. Note: If there are more consecutive Page Throw = *NO lines than the Maximum LPP then a page throw will be forced at the point where the limit has been reached.
*FIRST Call
This is a call passing the Number of lines per page and the Maximum number of lines per page. This must be called in the PAGE = *FIRST Condition in your Cobwebb Design as this is per document in the spooled file.
Parameter  | 
In  | 
Len  | 
Comments  | 
PARM1  | 
Lines per page (LPP)  | 
3  | 
This must be the same as in your *FIRST call to the ADVRFMT in your PPD. Default 30.  | 
PARM2  | 
Maximum LPP  | 
3  | 
This must be greater than the LPP. Default is 249.  | 
PARM3  | 
  | 
||
PARM4  | 
  | 
||
PARM5  | 
  | 
||
PARM6  | 
*FIRST  | 
7  | 
*DET Call
This is a call to store all of the information for the *DET lines into arrays for re-pagination. Note: You can only pass in a maximum number of 99,999 *DET lines into this program. If you pass in more then ‘*ERROR’ will be passed back in PARM1.
Parameter  | 
In  | 
Len  | 
Comments  | 
PARM1  | 
Data  | 
132  | 
The spooled file data to be paginated.  | 
PARM2  | 
Data  | 
132  | 
The spooled file data to be paginated, only if using *WIDE.  | 
PARM3  | 
Detail Key Field 1  | 
30  | 
Key 1 to sequence lines.  | 
PARM4  | 
Detail Key Field 2  | 
30  | 
Key 2 to sequence lines.  | 
PARM5  | 
Page Throw *NO/*NOW  | 
4  | 
*NO if you do not want to allow a skip to a new page after this line, *NOW if you want to throw a page after this line, else leave blank.  | 
PARM6  | 
*DET  | 
7  | 
*LAST Call
This call will pre-paginate all the supplied *DET lines and alter the Page Throw entry for a line if required (PARM5 from the *DET call). Once the data has been paginated it is passed to the Advanced Reformatting Utility as a *DET call. This must be called in the PAGE = *LAST Condition in your Cobwebb Design as this is per document in the spooled file.
Parameter  | 
In  | 
Len  | 
Comment  | 
PARM1  | 
|||
PARM2  | 
|||
PARM3  | 
|||
PARM4  | 
|||
PARM5  | 
|||
PARM6  | 
*LAST  | 
7  |