z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Examples of the OUTDISP parameter

z/OS MVS JCL Reference
SA23-1385-00

Example 1
//OUTDS6   OUTPUT  OUTDISP=(KEEP,PURGE)

When the job completes successfully, the disposition of the data set is KEEP. After the sysout is printed, the data set disposition changes to LEAVE, and the sysout data set is held until released by the user or operator.

If the job does not complete normally, the system purges the data set without any post-execution processing.

Example 2
//OUTNORM   OUTPUT  OUTDISP=(WRITE,PURGE),DEST=ROOM111
//OUTBAD    OUTPUT  OUTDISP=(PURGE,HOLD),NAME='D JONES'
//DD5       DD      SYSOUT=A,OUTPUT=(*.OUTNORM,*.OUTBAD)

If the job completes successfully, the output for DD DD5 is to be sent to the destination ROOM111. If the job does not complete successfully, the output is to be held for a programmer named D JONES. D JONES can view the output on the screen, and then purge it or release it to be printed if further diagnosis is required.

There are two OUTPUT statements, OUTNORM and OUTBAD. In any given case, however, only one of the OUTPUT statements actually produces output. For successful completion, the WRITE option on the OUTNORM statement specifies that the output should be printed and sent to ROOM111, and the PURGE option on OUTBAD specifies that no output is produced for the OUTBAD statement. For unsuccessful completion, the HOLD option on the OUTBAD statement specifies that the output should be held for D JONES, and the PURGE option on OUTNORM specifies that no output is produced for the OUTNORM statement.

Example 3
//SYSOUTK   OUTPUT  OUTDISP=(WRITE,HOLD)
//REPORT1   DD      SYSOUT=K,OUTPUT=*.SYSOUTK

The system processes the data set using OUTPUT statement SYSOUTK.

When the job completes successfully, the WRITE option specifies that the system should print and then purge the output.

When the job does not complete successfully, the HOLD option specifies that the system should hold the output.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014