Skip to main content

Using multiple statements on the OUTPUT statement in JCL

  • September 18, 2015
  • 0 replies
  • 0 views

Problem

When several OUTPUT statements are used on the same DD and the last class is not associated to a printer exit, the printouts associated to the printer exit are not sent to the printer.

Classes associated to a printer exit: ADFGHKO1

JCL executed:

//TEST  JOB (TEST),MSGCLASS=X,CLASS=A                

//OUT1     OUTPUT FORMDEF=FORMD1,PAGEDEF=PAGD1,CLASS=1

//OUT3     OUTPUT FORMDEF=FORMD2,PAGEDEF=PAGD2,CLASS=Z

//STEP001   EXEC PGM=IEBGENER                                   

//SYSPRINT  DD   SYSOUT=*                                       

//SYSUT1    DD   *                                              

EXAMPLE TEXT TO PRINT

/*                                                 

//SYSUT2     DD SYSOUT=(,),OUTPUT=(*.OUT1,*.OUT3)

 

In this case the printout is not sent to the printer exit as only the last output class is used to determine what happens and CLASS=Z has not been associated with a printer exit.

 

Resolution

Please add the following environment variable to your region configuration :-

 

ES_JES_SPOOL_MVS=Y

 

This will create 2 SYSUT2 files in the JES output, 1 for each class and the output will get spooled to your printer correctly.


#output
#PRINTEREXIT
#Spool
#MFDS
#EnterpriseDeveloper
#JCL

0 replies

Be the first to reply!