Joined: 21 May 2009 Posts: 139 Location: United States
Hi,
my requierement is as-
1 a
2 b
3 c
4 d
5 e
6 f
7 TRAILER 0006
I need to take the count of records(i.e. first 6 in example) in the file and then compare that count with the number that is mentioned against TRAILER(0006). How can it be done using SORT or other utility?
Now if that matches/not matches, is it possible to get some output/return code, based on which I'll run one more step to generate a mail ?
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
what are the exact column locations
of the word TRAILER
and
the count within the trailer record.
will the count always contain leading zeroes
and always be the same length?
can there be more than one trailer record?
are all records to be considered as detail records?
except
the trailer record, which you will define according to the above questions.
Opps... I have included trailer records also while comparing count.
In your first record shown there are 6 records so rec count at trailer is without including trailer record.
Do the change in sortcard as shown below to do what you expected.
Do u see a problem here ? am getting RC=0 only everytime.
Here is the spool-
Code:
WER108I SORTIN : RECFM=FB ; LRECL= 400; BLKSIZE= 27600
WER257I INREC RECORD LENGTH = 406
WER238I POTENTIALLY INEFFICIENT USE OF INREC
WER110I SORTOUT : RECFM=FB ; LRECL= 400; BLKSIZE= 27600
WER405I SORTOUT : DATA RECORDS OUT 0; TOTAL RECORDS OUT 0
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER054I RCD IN 5, OUT 5
Joined: 21 May 2009 Posts: 139 Location: United States
am sorry Will, i thot its my mistake, but I just took it frm Escapa as is I see. I changed names to FILEIN and FILEOUT. Still the spool says-
Code:
SYSIN :
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(401:SEQNUM,6,ZD))
OUTFIL INCLUDE=(1,7,CH,EQ,C'TRAILER',AND,9,6,ZD,EQ,401,6,ZD),
NULLOFL=RC16
WER276B SYSDIAG= 3105571, 4858101, 4858101, 4731549
WER164B 7,908K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,016K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER224A SORTOUT NOT DEFINED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
SYNCSORT FOR Z/OS 1.3.0.3R U.S. PATENTS: 4210961, 5117495 (C)
Chrysler LLC z/OS 1
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1F444, MODEL 2097 510
SYSIN :
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(401:SEQNUM,6,ZD,START=0))
OUTFIL INCLUDE=(1,7,CH,EQ,C'TRAILER',AND,9,6,ZD,EQ,401,6,ZD),
NULLOFL=RC16
WER276B SYSDIAG= 3116379, 4868895, 4868895, 4731549
WER164B 7,908K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,016K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER224A SORTOUT NOT DEFINED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Joined: 21 May 2009 Posts: 139 Location: United States
hi all , thanks for all the help you are rendering.
i understand your concern that I should look at the manual. i checked it but its not helping me out in one day. and my query is regarding something which am working on right now so its not feasible for me to create a desired sort card just by looking at the manual. am jut trying to get the solution first and then go to the manual to understand it once it works for me.
following spool-it says sortout/outfil contains no recs-
Code:
WER164B 7,908K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,339,720 BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 400; BLKSIZE= 27600
WER257I INREC RECORD LENGTH = 406
WER238I POTENTIALLY INEFFICIENT USE OF INREC
WER110I SORTOF01 : RECFM=FB ; LRECL= 400; BLKSIZE= 27600
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 2,192,264 BYTES USED
WER405I SORTOF01 : DATA RECORDS OUT 0; TOTAL RECORDS OUT 0
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER461A SORTOUT/OUTFIL DATA SET CONTAINS NO DATA RECORDS
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
Read the manual....
SyncSort for z/OS 1.3 Programmer’s Guide wrote:
The NULLOFL parameter specifies the action to be taken when any non-SORTOUT OUTFIL data set contains no data records.
RC0 The delivered default instructs SyncSort to issue a return code of 0 if not overridden by a higher return code set for another reason.
RC4 Instructs SyncSort to issue a WER461I warning message and continue processing. A return code of 4 will be issued if not overridden by a higher return code set for
another reason.
RC16 Instructs SyncSort to issue a WER461A message and to terminate processing with a return code of 16.
Was a WER461 message generated?
What letter (severity) code was used?
What was the return code of the job step?
my requirement is to just get a return code based on the match of counts and then proceed based on that RC. But RC16 leads to the abend. Shall I change it to RC4 from SORT step and then go ahead.is it advisable ?