MainframeSupports
tip week 38/2004:

Sometimes it is a bit tedious to display the contens of a dataset used in a job. First of all the dataset has to be allocated using the correct DCB parameters. Next you have to display the contens of the dataset after each job execution as long as you develop and test. All this can be done in one task if you use SYSOUT=* as a "dataset".

Let's assume that you have a program that creates records in a dataset with LRECL=80 and RECFM=FB (not an uncommon situation). The following step will direct output to SYSOUT=* instead of a dataset:

//TOSYSOUT EXEC PGM=MYPGM
//STEPLIB  DD DISP=SHR,DSN=MY.LOAD.MODULES
//OUTPUT   DD SYSOUT=*,LRECL=80,RECFM=FB
//OUTPUT   DD DISP=SHR,DSN=MY.OUTPUT.DATASET

This step introduces two tip. First tip is that output will always be sent to the first occuring DD name in the step if the same DD name is specified more than once. You might say that the second OUTPUT DD name is a kind of comment. The second tip is that JES always will honour DCB parameters specified on SYSOUT=*

Using the above method you will be able to view the job output and the result written to SYSOUT at the same time using SDSF or SYSVIEW. Data is not written to the dataset, but in SDSF you can use the XDC line command described in week 18 in 2001 to write the contens of SYSOUT to a dataset. Using SYSOUT=* is especially useful in situations where the output normally goes to a temporary dataset used in a later step and then deleted.

Previous tip in english        Sidste danske tip        Tip list