Gone through the few similar posts in this forum, but I was not able to derive solution to my problem.
I am working on a requirement in which I have to join three flat files
File1 : Key1Data1
File2 : Key2Data2
File3 : Key3Data3
Where each file LRECL is of (Key + Data) = (8 + 992) = 1000 bytes.
Now I have to Join these 3 files in LRECL of 3000 Bytes and
1) If a key is common in the three files, O/P will contain
3000 bytes as addition from file1, file2 and file3
2) If there is no matching record found in any of the above files, process should still write an output record with missing file-record being initialized.
For example,
A) If the Key1 is not matching with Key2 or Key3, o/p should
contain only first 1000 bytes and rest 2000 bytes initialized.
(Key1Data1)(Spaces)(Spaces) ----> Total 3k bytes
B) Similarly non matching Key2 will have
(Spaces)(Key2Data2)(Spaces) ----> Total 3k bytes
Can I do this with ICETOOL ? And what should be the key statements
Appreciate your quick reply.
I tried with the above code and the job failed with following error:
ICE146I 0 END OF STATEMENTS FROM CTL4CNTL - PARAMETER LIST STATEMENTS FOLLOW
DEBUG NOABEND,ESTAE
OPTION,MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL4,SORTIN=T7,
SORTOUT=OUT123,DYNALLOC,SZERO,EQUALS,NOVLSHRT,LOCALE=NONE
OCHECK
SORT FIELDS=(3002,8,CH,A)
MODS E35=(ICE35DU,12288)
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE027A 1 END OF FIELD BEYOND MAXIMUM RECORD LENGTH
I have also tried
1) writting to separate temp datasets and concatenating and
2) with (MOD,PASS) disposition for temp datasets (See below code)
but still got ICE027A.
Make sure you make that change to //T7. You don't need that "earlier code" with the concatenation.
Not having MOD would give you incorrect output, but it wouldn't give you the error you're getting as that indicates the T7 data set has less than 3001 bytes.
In fact, the only reason I can think of for you getting that message is that your site has changed DFSORT's shipped installation default of SOLRF=YES to SOLRF=NO. That's NOT a good idea. But if it's true, then you can add the following to your job to take care of it:
Code:
//DFSPARM DD *
OPTION SOLRF
/*
If that doesn't fix the problem, then post ALL of your DFSMSG messages.