Example - obtaining output in a JES2 system

  
  
/*PRIORITY 5  
//OUTJOB  JOB  BAKER,PERFORM=100,MSGCLASS=J  
/*SETUP   SCHLIB  
/*JOBPARM COPIES=2,LINECT=20,ROOM=223,FORMS=GRN1  
//OUT1    OUTPUT JESDS=ALL  
//OUT2    OUTPUT DEST=PRINTER8,FCB=STD3,FORMS=2PRT,UCS=TN  
//STEP1   EXEC  PGM=TESTSYSO  
//DD1    DD DSN=DATA,DISP=OLD,UNIT=3390,VOL=SER=SCHLIB  
//DD2     DD    DSN=&&TEMP,UNIT=3390,DISP=(NEW,DELETE),  
        SPACE=(TRK,(10,5))  
//DD3     DD    SYSOUT=A,OUTPUT=*.OUT2  
//DD4     DD    SYSOUT=(A,,GRPH)  
//DD5     DD    SYSOUT=L,OUTPUT=*.OUT1,DEST=HDQ  
This example shows the use of JES2 and JCL statements to obtain output.
  1. The job will be selected at priority level 5.
  2. The job will run in performance group 100; the meaning of 100 is defined by the installation. All system messages are to be written to output class J.
  3. The JOBPARM statement indicates that:
    1. Two copies of the entire job-related output will be printed.
    2. No more than 20 lines per page will be printed (LINECT=20). You can override this LINECT parameter by coding the LINECT parameter on the OUTPUT JCL statement.
    3. The programmer's room number is 233. This appears on the separator page and is used for distributing output.
    4. Forms name GRN1 is the name of the form to be used by all data sets unless a specific form is defined on a DD, JES2 /*OUTPUT, or JCL OUTPUT statement.
  4. The OUTPUT JCL statement OUT2 indicates that:
    1. The destination for the output is PRINTER8. PRINTER8 does not necessarily have to be defined as a printer, it can be defined as any output device.
    2. If the printer has the forms control buffer feature, STD3 must be the name of a member of SYS1.IMAGELIB. STD3 defines the special forms control buffer image to be used for processing any data set that has *.OUT2 coded in the SYSOUT parameter.
    3. Forms name 2PRT is the name of the form JES2 uses for printing any data sets that have *.OUT2 coded in the SYSOUT parameter (for example, DD3).
    4. TN is the train or UCS used in output processing.
  5. The SETUP statement indicates that volume SCHLIB should be mounted before this job begins processing.
  6. SYSOUT data sets (except DD3 and DD4) are printed on the form called GRN1. The DD4 SYSOUT data set is printed on the form called GRPH; the DD3 SYSOUT data set is printed on the form called 2PRT because the code name subparameter of DD3 contains the value *.OUT2 (referring to the OUTPUT JCL statement).
  7. The output data set from DD5 and the accompanying data sets will be sent to HDQ.