[OT] JCL SYSOUT for Inline DFSORT?

docdwarf_at_panix.com
Date: 06/14/04


Date: 14 Jun 2004 07:45:27 -0400


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



Relevant Pages

  • Re: [OT] JCL SYSOUT for Inline DFSORT?
    ... There are a NUMBER of different ways to redirect different parts of SYSOUT from ... - For VS COBOL II and later, see the OUTDD compiler option ... > separate SORT step where ... and in the program, where the trailer gets written, I coded: ...
    (comp.lang.cobol)
  • Re: [OT] JCL SYSOUT for Inline DFSORT?
    ... There are a few special registers set up for the sort interface on IBMs ... OUTDD(SYSOUT2)" and see if Sort still writes to SYSOUT. ... and in the program, where the trailer gets written, I coded: ... > OPEN EXTEND OUTFIL. ...
    (comp.lang.cobol)
  • Re: My ISF Report
    ... else between them and the main body of campers... ... and Cindy's trailer, forming their own little campground of sorts. ... sort of road between myself and Jim Cook's camp. ... trying to revive the previous night's campfire! ...
    (rec.motorcycles.dirt)
  • Re: Report Sorting at Run Time
    ... I have looked at all posts and tried both Allen Browne's Report ... Group, Followed by Trailer #. ... ' Default Report Sort: Whse, Date, Trailer# ...
    (comp.databases.ms-access)
  • Re: Report Sorting at Run Time
    ... ' Default Report Sort: Whse, Date, Trailer# ... Is the code in the Report Open event?- Hide quoted text - ...
    (comp.databases.ms-access)