VPSOPT=15 specialized node parameter was added with QO77734 to read input print records for a $$FORMS= as the first print record. The FORM is used to pass print formatting commands to the TCP/IP printer and can be read from a PCLLIB or PJLLIB resource library.
This new support is included in the base r11.5, SP0, 0808. It is also included in r11.0, SP2, 0607. For previous genlevels of r11.0 you can apply APAR QO77734 to add this new support.
The new support provides specialized code that is invoked only if the printer DEFNODE/NODE defintion contains a VPSOPT=15 specification. This code can be used as an example of how to set file attributes that affect print formatting based on information contained in the data.
If VPSOPT=15 is specified, at print time, print exit ESFU009 will examine the first print record for the keyword $$FORMS= beginning some where between position 1 and position 12. If $$FORMS= is found, the 8 character form name following the $$FORMS= will be used as the FORM name to select the desired member from the PCLLIB or PJLLIB resource library. In addition, the record containing the $$FORMS= keyword will be deleted from the print file.
Example 1:
EDIT CAI.ESF.PCLLIB( FORMSTD1 ) - 01.03 Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ***************************** 000001 &l1O 259FD444444444444444444444444444444444444444444444444444444444444444444 70316000000000000000000000000000000000000000000000000000000000000000000 ------------------------------------------------------------------------------ 000002 (s12.00H 24AFF4FFC44444444444444444444444444444444444444444444444444444444444444
7D212B00800000000000000000000000000000000000000000000000000000000000000 ------------------------------------------------------------------------------ 000003 &l6D 259FC444444444444444444444444444444444444444444444444444444444444444444
70364000000000000000000000000000000000000000000000000000000000000000000 ------------------------------------------------------------------------------ ****** **************************** Bottom of Data ***************************
Example 2:
EDIT CAI.ESF.PJLLIB( FORMSTD2 ) - 01.01 Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ***************************** 000001 @PJL SET ORIENTATION=LANDSCAPE 000002 @PJL SET FORMLINES=48 000003 @PJL SET LPARM:PCL PITCH=15.00 ****** **************************** Bottom of Data ***************************
000345 *-----------------------------------------------------------* A-TF37520 000346 * If VPSOPT=15 read 1st record and test for $$FORM= * A-TF37520 000347 * and if present move the form name to @#OPGFORM for * A-TF37520 000348 * print driver option 3 to use. * A-TF37520 000349 *-----------------------------------------------------------* A-TF37520 000350 TM DCENVPO2,X'02' VPSOPT=15 A-TF37520 000351 BZ FOPENFIN Continue of no A-TF37520 000352 NI R1STFLAG,255-R1STDREC-R1STDRD Reset flags @ A-TF37520 000353 USING @OPEN,R9 ESFOPEN parmlist access A-TF37520 000354 LA R4,R1STPARM Point to ESFREAD parm area A-TF37520 000355 USING @READ,R4 ESFREAD parmlist access A-TF37520 000356 MVC @READCBA,@OPENCBA Move A(File CBA) A-TF37520 000357 MVI @READFLG,@READFLA Indicate to use @READBUF A-TF37520 000358 LA R3,R1STBUF Point to buffer area A-TF37520 000359 ST R3,@READBUF Set @READBUF A-TF37520 000360 MVC @READFNO,@OPENFNO Set file number A-TF37520 000361 MVC @READRCL,=F'512' Length of buffer area A-TF37520 000362 ST R4,R1STLIST Point to parmlist A-TF37520 000363 OI R1STLIST,X'80' Flag last parm pointer A-TF37520 000364 LA R1,R1STLIST Load -> ESFREAD parmlist A-TF37520 000365 L R15,=V(ESFREAD) Point to ESFREAD EP A-TF37520 000366 BALR R14,R15 Link to ESFREAD A-TF37520 000367 CLC @READSTA,=CL2' ' Status OK ? A-TF37520 000368 BNE FOPENFIN If not - continue A-TF37520 000369 FOPENROK DS 0H A-TF37520 000370 LA R3,12 Load count A-TF37520 000371 L R2,@READBUF Point to record col 6 A-TF37520 000372 FOPENNC DS 0H A-TF37520 000373 CLC 0(8,R2),=C'$$FORMS=' Magic keyword present A-TF37520 000374 BE FOPEN$$F Branch if yes A-TF37520 000375 LA R2,1(R2) Bump to next column A-TF37520 000376 BCT R3,FOPENNC Go test it if not col 12 A-TF37520 000377 B FOPENFIN Did not find $$FORMS= A-TF37520 000378 FOPEN$$F DS 0H A-TF37520 000379 MVC @OPGFORM,8(R2) Move FORM to ESFOPEN parms A-TF37520 000380 OI R1STFLAG,R1STDREC Flag rec to be deleted @ A-TF37520 000381 B FOPENFIN Done - continue A-TF37520 000382 DROP R4 A-TF37520 000383 DROP R9 A-TF37520