Is there any option or command (built in) in SORT to get this info in the spool as a separate sysout?
File1 records read count
File2 records read count
Matched records read count
Unmatched record count only in file1
Unmatched record count only in file2
Number of records written in o/p file.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
abdul.faras wrote:
Is there any option or command (built in) in SORT to get this info in the spool as a separate sysout?
File1 records read count
File2 records read count
Matched records read count
Unmatched record count only in file1
Unmatched record count only in file2
Number of records written in o/p file.
Tried to find this in manual/web, but no luck...
Do you mean that you have a need of these figures for a particular requirement, or in general?
I was not able to attach this as notepad, so pasting here:
Code:
1ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=722
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE751I 0 C5-K62149 C6-K90026 C7-K58148 C8-K67572 E9-K60824 C9-BASE E5-K70685 E7-K70685
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 07:49 ON MON APR 09, 2012 -
0 JOINKEYS FILE=F1,FIELDS=(1,6,A),SORTED,NOSEQCK 00260015
JOINKEYS FILE=F2,FIELDS=(176,6,A),SORTED,NOSEQCK 00270015
JOIN UNPAIRED,F1 00280015
REFORMAT FIELDS=(F1:1,700,F2:176,6,21,1,91,14,?) 00290015
OPTION COPY 00300015
INREC IFTHEN=(WHEN=(722,1,CH,EQ,C'B'), 00310015
OVERLAY=(524:708,14,ZD,MUL,+100,TO=PD,LENGTH=8), 00320015
HIT=NEXT), 00321015
IFTHEN=(WHEN=(722,1,CH,EQ,C'1'), 00330015
OVERLAY=(524:X'000000000000000C'), 00340015
HIT=NEXT), 00341015
IFTHEN=(WHEN=((707,1,CH,EQ,C'Y',AND,722,1,CH,EQ,C'B'), 00350015
OR,722,1,CH,EQ,C'1'), 00360015
OVERLAY=(532:X'000000000000000C'), 00370015
HIT=NEXT), 00371015
IFTHEN=(WHEN=(707,1,CH,NE,C'Y',AND,722,1,CH,EQ,C'B'), 00380015
OVERLAY=(532:708,14,ZD,MUL,+100,TO=PD,LENGTH=8)) 00390015
OUTREC BUILD=(1,700) 00400015
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=722
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE162I 0 ICEIEXIT CHANGED ONE OR MORE OPTIONS IN EFFECT
ICE751I 0 C5-K62149 C6-K90026 C7-K58148 C8-K67572 E9-K60824 C9-BASE E5-K70685 E7-K70685
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED
ICE252I 1 PARMLIB OPTIONS WERE MERGED WITH INSTALLATION MODULE DEFAULTS
ICE089I 0 BRYYY42J.PS060 . , INPUT LRECL = 722, TYPE = F
ICE093I 0 MAIN STORAGE = (MAX,6291456,6270976)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6207942,6207942)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=ABEND,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=SHORT,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N ,ABCODE=MSG
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=N,WRKREL=Y,OUTREL=Y,CKPT=N,COBEXIT=COB2
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=Y,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
ICE133I 0 OPTIONS: HIPRMAX=0 ,DSPSIZE=0 ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=0
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE236I 0 OPTIONS: DYNAPCT=10 ,MOWRK=Y
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
ICE751I 1 EF-BASE F0-K66717 E8-K70685
ICE421I 0 JOINED RECORDS: COUNT=5804156
ICE090I 0 OUTPUT LRECL = 700, BLKSIZE = 32200, TYPE = FB
ICE055I 0 INSERT 5804156, DELETE 0
ICE054I 0 RECORDS - IN: 0, OUT: 5804156
ICE052I 0 END OF DFSORT
Firstly, I may have appeared too "literal". When I said "sysout" I meant "sysout=whatever", not just the SYSOUT DD. You have counts of the two input files in your other two message datasets.
The thing then is, how do you break-down the "joined" count. I'm not sure (but I will be corrected) if this can be done in a "useful" manner by default, the reason being the potential, as far as JOINKEYS is concerned, for duplicates on either, or both, input files.
So, if you want a breakdown of the joined data, you have to do it yourself, with knowledge of your data.
While we are here:
Is your output going to tape?
Your sort cards could benefit from a bit of rationalisation.
Thats what I was looking for, some inbuilt feature or option in sort.
I know, we can get i/p file record count in the JNF1JMSG and JNF2JMSG, but not the matched and o/p file write count.
No, the output is not going to tape, can still it be benefitted with rationalisation?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Yes, the two things are not connected.
Your output seems, then, to have its own blocksize specified. 32,000 for a 3390 disk is not good, as it will leave a huge lump of each track empty. Either let DFSORT do the blocksize (best) or calculate a good blocksize manually.
The rationalisation of the sort cards revolves around the presence or otherwise of an actual match. The key from file 2 you do not need on the reformat record: it is either not present, or it is the same as on the F1. You test a flag extracted from F2, which only makes sense for a B, yet you also test for 1. The results will be the same, but things are confusing to the reader.
If you want some review of the cards, please provide the business description of the process (not just write down what the current cards are doing).
Back to your original question, input to the sub-task, input to the main task, output from the main task, including OUTFIL processing, all of those you have.
The breakdown of the matching process, you'd have to do yourself, I think.
You'll need SORTOFF1 in your JCL, I'd make it a DUMMY as nothing should get on to it.
The idea is to include all the the "1" values from the join marker, but then, with NODETAIL, to remove them from the output dataset. You will see the count for these in the SYSOUT dataset. You should then have the information you need to know all the figures, I think.
EDIT: Forgot to say, check back later/tomorrow for the best answers/solution from San Jose.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Well, as they say - there are lies, damn lies and statistics.
I'm not sure what statistics exactly you're looking for or whether they make sense for every type of JOINKEYS operation (e.g. cartesian join).
Please show an example of the records in your input files for the cases you are interested in (dups in file1? dups in file2?) and show what you would expect the statistics to show (the actual numbers for your input examples). That might help you to figure out if what you want is actually meaningful. It would certainly help me figure out what you're trying to do exactly.
Let me give you some background. There are few old COBOL programs witch are doing file matching logic on very huge files, and consuming lots of CPU. So to reduce the CPU usage, I am trying to incarporate same logic in JOINKEY.
Now, cobol has displays of stats in SYSOUT and that is the reason I am looking for same in SORT.
Input & output files are FB.
There are no duplicates in both the files.
Number of records are around 5 million.
LRECL are as follows:
I/P 1- 700
I/P 2 - 200
O/P - 700 (same as I/P)
File1 records read count -
File2 records read count -
Matched records count -
Unmatched record count only in file1 -
Unmatched record count only in file2 -
Number of records written in o/p file -
OUTFIL FNAMES=RPT,REMOVECC,NODETAIL,BUILD=(80X),
TRAILER1=('FILE1 RECORDS READ COUNT : ',
TOT=(712,1,ZD,M11,LENGTH=8),/,
'FILE2 RECORDS READ COUNT : ',
TOT=(713,1,ZD,M11,LENGTH=8),/,
'MATCHED RECORDS COUNT : ',
TOT=(714,1,ZD,M11,LENGTH=8),/,
'UNMATCHED RECORD COUNT ONLY IN FILE1 : ',
TOT=(716,1,ZD,M11,LENGTH=8),/,
'UNMATCHED RECORD COUNT ONLY IN FILE2 : ',
TOT=(717,1,ZD,M11,LENGTH=8),/,
'NUMBER OF RECORDS WRITTEN IN O/P FILE : ',
TOT=(712,1,ZD,M11,LENGTH=8))
//*
//JNF2CNTL DD *
INREC BUILD=(176,6,91,14,ZD,MUL,+100,PD,LENGTH=8,21,1)
//*