Home > Archive > Cobol > June 2004 > [OT] JCL SYSOUT for Inline DFSORT?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[OT] JCL SYSOUT for Inline DFSORT?
|
|
| docdwarf@panix.com 2004-06-14, 3:55 pm |
|
All righty... here's the deal. The output file's format is along the
lines of:
01 OUTREC.
05 OUTREC-TYP PIC X(01).
05 OUTREC-SSN PIC 9(09).
05 OUTREC-DT PIC X(06).
.... with -TYP 1 = header rec, -TYP 2 thru 5 = various details and -TYP 6 =
trailer. -DT is in YYMMDD format. The program also does a bunch of
totalling which is DISPLAYed to SYSOUT; SYSOUT is directed to a file of
DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0) and printed (via REPRO) in a later
step.
All has gone well until a new criterion to be included in the -TYP 2
records was introduced, a criterion which cannot be determined until all
-TYP 5 recs have been written. Since the -DT on the -TYP 2 rec was the
lowest of a range of dates for any given -SSN I first tried to code a
separate SORT step (the shop uses DFSORT) where
SORT FIELDS=(2,15,CH,A,1,1,CH,A)
.... and this did not work as planned; the -TYP 6 record contains totals
and the trailer-rec wound up someplace in the middle of the file.
No problem, I thought... I put in an SD of:
SD SORTFIL
BLOCK CONTAINS 0 RECORDS
| |
| Howard Brazee 2004-06-14, 8:55 pm |
| The best person to solve your need is Frank Yaeger Yaegar@ibm.lst
He hangs around ibm-main@bama.ua.edu, which listserver requires one to
subscribe. I have my subscription set to write, but not get e-mails,
preferring to read them on news://bit.listserv.ibm-main . A non-subscriber
can post there, but messages don't get e-mailed and Frank doesn't read from the
newsgroup.
He is THE expert on DFSORT.
You might also check out:
http://ssdweb01.storage.ibm.com/sof...s/srtmtrck.html
| |
| William M. Klein 2004-06-14, 8:55 pm |
| There are a NUMBER of different ways to redirect different parts of SYSOUT from
different products.
- For OS/VS COBOL (which I know you used to be "stuck" with) see the SYSOU=
compiler option
- For VS COBOL II and later, see the OUTDD compiler option
- For LE see the MSGFILE run-time option
- For DFSort, see the MSGDDN run-time option
Let me know if you need online references to where to find one of these (unless
it is OS/VS COBOL - which isn't online)
--
Bill Klein
wmklein <at> ix.netcom.com
<docdwarf@panix.com> wrote in message news:cak34n$5bb$1@panix5.panix.com...
>
> All righty... here's the deal. The output file's format is along the
> lines of:
>
> 01 OUTREC.
> 05 OUTREC-TYP PIC X(01).
> 05 OUTREC-SSN PIC 9(09).
> 05 OUTREC-DT PIC X(06).
>
> ... with -TYP 1 = header rec, -TYP 2 thru 5 = various details and -TYP 6 =
> trailer. -DT is in YYMMDD format. The program also does a bunch of
> totalling which is DISPLAYed to SYSOUT; SYSOUT is directed to a file of
> DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0) and printed (via REPRO) in a later
> step.
>
> All has gone well until a new criterion to be included in the -TYP 2
> records was introduced, a criterion which cannot be determined until all
> -TYP 5 recs have been written. Since the -DT on the -TYP 2 rec was the
> lowest of a range of dates for any given -SSN I first tried to code a
> separate SORT step (the shop uses DFSORT) where
>
> SORT FIELDS=(2,15,CH,A,1,1,CH,A)
>
> ... and this did not work as planned; the -TYP 6 record contains totals
> and the trailer-rec wound up someplace in the middle of the file.
>
> No problem, I thought... I put in an SD of:
>
> SD SORTFIL
> BLOCK CONTAINS 0 RECORDS
> .
> 01 SORTREC.
> 05 SORT-TYP PIC X(001).
> 05 SORT-SSN-N-DATE PIC X(015).
> 05 SORT-REST PIC X(144).
>
> ... and in the program, where the trailer gets written, I coded:
>
> CLOSE OUTFIL.
>
> SORT SORTFIL ASCENDING KEY SORT-SSN-N-DATE
> SORT-TYP
> USING OUTFIL
> GIVING OUTFIL.
>
> OPEN EXTEND OUTFIL.
> (format and write -TYP 6 rec).
>
> ... and it works like a dream... *almost*. The SYSOUT gets blown away;
> instead of being RECFM=FBA,LRECL=133 and containing the DISPLAYs it
> gets... transformed, somehow, to RECM=FBA,LRECL=121 and contains only the
> SORT's SYSOUT data (various ICEnnnnI messages).
>
> Is there some way anyone point me towards a place where I can find a
> way that will allow me to redirect these (for this program) worthless SORT
> messages to, say, SYSOUZ (or another DDname) and thus preserve the
> DISPLAYs the users wish to see? It would be rather... unpleasant to have
> to WRITE the trailer to a separate file, SORT the main OUTFIL and then
> concatenate the two via a GENR... but if I have to, I have to.
>
> Thanks much!
>
> DD
>
| |
| docdwarf@panix.com 2004-06-15, 8:55 am |
| In article <Xkozc.450$w07.325@newsread2.news.pas.earthlink.net>,
William M. Klein <wmklein@nospam.netcom.com> wrote:
>There are a NUMBER of different ways to redirect different parts of SYSOUT from
>different products.
>
> - For OS/VS COBOL (which I know you used to be "stuck" with) see the SYSOU=
>compiler option
> - For VS COBOL II and later, see the OUTDD compiler option
> - For LE see the MSGFILE run-time option
> - For DFSort, see the MSGDDN run-time option
Gah... that ol' porous memory again. I was poking about on
<http://publibz.boulder.ibm.com/cgi-...124143823&CASE=>
.... and things started to look... familiar... so I went into my JCL.CNTL
PDS and found a member, SORTPARM, that I'd put together back in December
of last year that looked like:
//MSGFILE DD SYSOUT=A
//SORTMSGS DD SYSOUT=A
//DFSPARM DD *
MSGDDN=SORTMSGS
/*
.... and I copied that into the jobstep in question... and she runs like a
watch.
Thanks to all for your time and assistance.
DD
| |
| Joe Zitzelberger 2004-06-15, 8:55 am |
| There are a few special registers set up for the sort interface on IBMs
compiler. IIRC there was a SORTMSG (or SORT-MESSAGE) or something like
that.
But there is definantly an option to specify external sort parms in the
DD SORTPARM (or is it $ORTPARM). You could specify the DFSORT equivlent
of SORTMSG(SYSOUZ).
Also, you might try redirecting the Cobol output using "PROCESS
OUTDD(SYSOUT2)" and see if Sort still writes to SYSOUT.
In article <cak34n$5bb$1@panix5.panix.com>, docdwarf@panix.com wrote:
> All righty... here's the deal. The output file's format is along the
> lines of:
>
> 01 OUTREC.
> 05 OUTREC-TYP PIC X(01).
> 05 OUTREC-SSN PIC 9(09).
> 05 OUTREC-DT PIC X(06).
>
> ... with -TYP 1 = header rec, -TYP 2 thru 5 = various details and -TYP 6 =
> trailer. -DT is in YYMMDD format. The program also does a bunch of
> totalling which is DISPLAYed to SYSOUT; SYSOUT is directed to a file of
> DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0) and printed (via REPRO) in a later
> step.
>
> All has gone well until a new criterion to be included in the -TYP 2
> records was introduced, a criterion which cannot be determined until all
> -TYP 5 recs have been written. Since the -DT on the -TYP 2 rec was the
> lowest of a range of dates for any given -SSN I first tried to code a
> separate SORT step (the shop uses DFSORT) where
>
> SORT FIELDS=(2,15,CH,A,1,1,CH,A)
>
> ... and this did not work as planned; the -TYP 6 record contains totals
> and the trailer-rec wound up someplace in the middle of the file.
>
> No problem, I thought... I put in an SD of:
>
> SD SORTFIL
> BLOCK CONTAINS 0 RECORDS
> .
> 01 SORTREC.
> 05 SORT-TYP PIC X(001).
> 05 SORT-SSN-N-DATE PIC X(015).
> 05 SORT-REST PIC X(144).
>
> ... and in the program, where the trailer gets written, I coded:
>
> CLOSE OUTFIL.
>
> SORT SORTFIL ASCENDING KEY SORT-SSN-N-DATE
> SORT-TYP
> USING OUTFIL
> GIVING OUTFIL.
>
> OPEN EXTEND OUTFIL.
> (format and write -TYP 6 rec).
>
> ... and it works like a dream... *almost*. The SYSOUT gets blown away;
> instead of being RECFM=FBA,LRECL=133 and containing the DISPLAYs it
> gets... transformed, somehow, to RECM=FBA,LRECL=121 and contains only the
> SORT's SYSOUT data (various ICEnnnnI messages).
>
> Is there some way anyone point me towards a place where I can find a
> way that will allow me to redirect these (for this program) worthless SORT
> messages to, say, SYSOUZ (or another DDname) and thus preserve the
> DISPLAYs the users wish to see? It would be rather... unpleasant to have
> to WRITE the trailer to a separate file, SORT the main OUTFIL and then
> concatenate the two via a GENR... but if I have to, I have to.
>
> Thanks much!
>
> DD
| |
| docdwarf@panix.com 2004-06-15, 8:55 am |
| In article <cal1a3$puh$1@peabody.colorado.edu>,
Howard Brazee <howard@brazee.net> wrote:
>The best person to solve your need is Frank Yaeger Yaegar@ibm.lst
Thanks much, Mr Brazee; Mr Yaeger and I have traded postings before and I
was holding off contacting him as a Last Resort.
[snip]
>You might also check out:
>
>http://ssdweb01.storage.ibm.com/sof...s/srtmtrck.html
The suggestion is apreciated, Mr Brazee... but this site seems to be of
greater value to those who need things more sophisticated than I.
(Editorial note: the site recommends, as a possibility, replacing
INCLUDE COND=(1,1,CH,GE,C'0',
AND,1,1,CH,LE,C'9',
AND,2,1,CH,GE,C'0',
AND,2,1,CH,LE,C'9',
AND,3,1,CH,GE,C'0',
AND,3,1,CH,LE,C'9',
AND,4,1,CH,GE,C'0',
AND,4,1,CH,LE,C'9',
AND,5,1,CH,GE,C'0',
AND,5,1,CH,LE,C'9',
AND,6,1,CH,GE,C'0',
AND,6,1,CH,LE,C'9')
.... with ...
INCLUDE COND=(1,6,BI,ALL,X'F0F0F0F0F0F0')
.... which screams, to my simple mind, 'Look, Ma! I'm a Programmer'!)
DD
| |
| docdwarf@panix.com 2004-06-15, 8:55 am |
| In article <joe_zitzelberger-3518C1.07500215062004@corp.supernews.com>,
Joe Zitzelberger <joe_zitzelberger@nospam.com> wrote:
>There are a few special registers set up for the sort interface on IBMs
>compiler. IIRC there was a SORTMSG (or SORT-MESSAGE) or something like
>that.
>
>But there is definantly an option to specify external sort parms in the
>DD SORTPARM (or is it $ORTPARM). You could specify the DFSORT equivlent
>of SORTMSG(SYSOUZ).
Thanks much, Mr Zitzelberger; see my response to Mr Klein for the $ORTPARM
(in this case DFSPARM) statements required.
DD
|
|
|
|
|