Skip to Content

Keep LSTs readable via unique &&LISTxyz

Printer-friendly versionPDF version

If you do NOT always have unique &&LIST-DSNs to store staging outputs (like SYSPRINTs) in the compressed listing (using PGM=SERPRINT), you'll end up with a compressed listing where multiple staging outputs are mixed together within the same (hard to read) area of the compressed listing. So how can you automatically prevent this from ever happening again?

These kinds of problems can be found easily by looking into a compressed listing, and trying to find the start/stop of a new staging output, and which turns out to contain more then 1 stepname.ddname in the same area of the compressed listing.

Workaround: 

At the beginning of every staging skeleton, initialise a variable like this:

)SET LISTCNT = 0

Typical places to do this are:

  • at the end of skel CMN$$JCD.
  • somewhere in CMN$$VAR skeleton.

Then anywhere in any staging related skeleton, always send the &&&&LIST… files to a DSN like &&&&LIST&LISTCNT. But such line is then to be preceeded by a )SET LISTCNT = &LISTCNT + 1. Here is a sample of this:

...
)SET LISTNO = &LISTNO + 1
//SYSPRINT DD DISP=(,PASS),DSN=&&&&LIST&LISTNO,
//            SPACE=(CYL,(1,10),RLSE),
//            DCB=(RECFM=FA,LRECL=133,BLKSIZE=27930)
...

This technique can be introduced using a step by step approach: first make the &LISTCNT var available (init it to 0), and then replace any &&LIST… occurence you ever find by the technique mentioned above.