In this example, page segments are called by using IPS records
in a traditional line data set. Page segment S1LOGO is printed on
all four pages of the document. Page segment S1MAP is printed only
on pages two and four. The user listed S1LOGO in the page definition
but did not list S1MAP in the page definition.
This example shows
how a hard page segment is coded by naming it in the page definition
Segment List:
setunits 10 cpi 6 lpi linesp 6 lpi ;
pagedef nnxx0 width 8.3 in height 10.8 in replace no ;
font fnorm cr10 ;
font fbold cb10 ;
pageformat p2nnxxx0 direction across ;
trcref 0 font fnorm ;
trcref 1 font fbold ;
segment S1LOGO ;
printline channel 1 repeat 1 position 5 5 font fnorm;
/* name */ field start 6 length 20 position current current ;
/* acct */ field start 1 length 5 position 20 current font fbold;
/* acct */ field start 1 length 5 position 70 -4 direction down ;
printline repeat 3 position 0 next font fnorm ;
printline channel 2 repeat 55 position 0 next ;
For this
example, the print records are included as part of the print job,
and the system IEBGENER utility is used to send them to the printer.
Because structured field records are included in the data set, the
record format must be defined with carriage control (RECFM=FBA).
//AFPIPS JOB ...
/*ROUTE PRINT DL3820B
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//OUT1 OUTPUT PAGEDEF=USERB
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=A,DCB=(RECFM=FBA,BLKSIZE=80),OUTPUT=*.OUT1
//SYSUT1 DD *
1This is print record 1 of page 1.
!........S1LOGO.........
This is print record 2 of page 1.
This is print record 3 of page 1.
1This is print record 1 of page 2.
!........S1LOGO.........
!........S1MAP..........
This is print record 2 of page 2.
This is print record 3 of page 2.
1This is print record 1 of page 3.
!........S1LOGO.........
This is print record 2 of page 3.
This is print record 3 of page 3.
1This is print record 1 of page 4.
!........S1LOGO.........
!........S1MAP..........
This is print record 2 of page 4.
This is print record 3 of page 4.
Because S1LOGO
is listed in the page definition, it will be loaded in the printer
at the beginning of page one and used for all four pages. S1MAP, which
is not listed in the page definition, will be loaded in the printer
at page 2, and loaded again for page 4.
The IPS structured
field contains unprintable hexadecimal coding, which is represented
by periods in the example. For information about coding the IPS structured
field, see Mixed Object Document Content Architecture Reference, AFPC-0004 and see AFP structured fields included in line data.