Page 1 of 1

Catalog sysout to a dataset

PostPosted: Wed Aug 04, 2010 11:56 am
by kvn
Hi All,

I would like to direct the sysout from a JCL to a dataset. But when cataloged to a dataset only the first couple of displays in the program are coming in the dataset. All the displays are coming correctly when the sysout is directed to the spool. The program is in COBOL and below is the JCL I have used.

//SYSOUT DD DSN=TEST.SOUT1,DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,BLKSIZE=0,LRECL=133,DSORG=PS),
// SPACE=(133,(10,5),RLSE),AVGREC=K

Regards,
kvn

Re: Catalog sysout to a dataset

PostPosted: Wed Aug 04, 2010 2:27 pm
by steve-myers
To me, your JCL looks OK. Since I'm not a Cobol person, I can't say if the linkage between the DCB parameters you used in you JCL statement and the file definition in your program are correct, but that is something we would need to know.

What I do not understand is your terminology. When you say "the first couple of displays in the program" are correct, are you really saying the program stops or fails after the displays, or that there is more output in the data set, but it looks incorrect?

Re: Catalog sysout to a dataset

PostPosted: Wed Aug 04, 2010 2:38 pm
by kvn
Steve..Thank you for the reply

There are around 50 lines of data in the spool, coming from displays in the program. All these 50 lines are visible in the spool when sysout is directed to spool as //SYSOUT DD SYSOUT=*. However when I run the JCL after cataloging the sysout, only first 5-6 lines of display are coming in the dataset. The JCL/Program ends fine with RC zero.

Re: Catalog sysout to a dataset

PostPosted: Wed Aug 04, 2010 3:11 pm
by expat
I agree with what Steve has said regarding the DCB parameters and would add that it is usually best to specify no DCB attributes for a dataset that is normally routed to SYSOUT. Obviously there are some exceptions where these parameters are needed, but I tend to find that these are few and far between. Also, SYSOUT would usually be xBA or xBM where x is either F or V.

Re: Catalog sysout to a dataset

PostPosted: Wed Aug 04, 2010 7:45 pm
by NicC
SYSOUT data is not usually 133 bytes long - and DISPLAYs are designed for the terminal so are likely to be 80 bytes long so you should really allocate in tracks rather than record size. For 50 lines 1 track should be sufficient. You also do not need DSORG.

Re: Catalog sysout to a dataset

PostPosted: Wed Aug 04, 2010 11:47 pm
by steve-myers
NicC - I agree DSORG is not really required, but I tend to put it in to make sure system determined blocksize is set during allocation rather than a somewhat chancier implementation in OPEN. Too often something went wrong, so I got in the habit of doing it that way.

RECFM=FBA, LRECL=133 is actually quite common. The IBM 1403 was available in 120 byte and 132 byte line widths. I think the 132 was the more common, but don't quote me on that. Add one byte for the non-printing carriage control character and that's where LRECL=133 comes from.