I have Input file INFILE with record length 120 and Key is at position 64 with X(10).
This file is already sorted on Key field.
I need to write records in separate output files based on below scenarios. I need to compare the Key field and the field at position 10 (where it contains either ‘E’ or ‘F’). No other values are present at this location.
Examples:
AAAA05038 -- has 2 ‘E’ records with no matching ‘F’. These type of records should write in separate file OUTFILE1
BBBB05101, EEEE05145, GGGG05237 – has only one ‘E’ record with no matching ‘F’. These type of records should write in separate file OUTFILE2
CCCC05102 and FFFF05195 – has 2 ‘E’ and 1 ‘F’ record. These type of records should write in separate file OUTFILE3
DDDD05136 and IIII00062 - has matching 1 to 1 ‘E’ and ‘F’ record. These type of records should write in separate file OUTFILE4
HHHH00025 – has only one ‘F’ record with no matching ‘E’. These type of records should write in separate file OUTFILE5
The above are the only scenario’s in the INFILE. There are no other scenarios. Can anyone please let me know if this can be done through DFSORT?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
So you can have 1, 2 or 3 records with each key, and the rules for which records go to which files are as follows?
OUTFIL1 - 2 records with key - 2 'E'
OUTFIL2 - 1 record with key - 1 'E'
OUTFIL3 - 3 records with key - 2 'E', 1 'F'
OUTFIL4 - 2 records with keys - 1 'E', 1 'F'
OUTFIL5 - 1 record with key - 1 'F'
And there are no other cases, like these?
2 records with key - 2 'F'
3 records with key - 1 'E', 2'F'
...
It is giving below error with return code 16 under DFSMSG step. Maybe it is problem with WHEN=GROUP identifier.
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER108I IN : RECFM=FB ; LRECL= 120; BLKSIZE= 27960
WER257I INREC RECORD LENGTH = 122
WER238I POTENTIALLY INEFFICIENT USE OF INREC
WER110I T1 : RECFM=FB ; LRECL= 123; BLKSIZE= 27921
WER405I T1 : DATA RECORDS OUT 6476; TOTAL RECORDS OUT 8993
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER054I RCD IN 6476, OUT 6476
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
AJAYREDDY,
Kolusu's job works fine with DFSORT. The WER messages indicate you're using Syncsort, not DFSORT. Kolusu and I are DFSORT developers. DFSORT and Syncsort are competitive products. We're happy to answer questions on DFSORT and DFSORT's ICETOOL, but we don't answer questions on Syncsort.