The above JCl is being used by me to append a field value from the second file to the first file based on matching recs.
The error being displayed is for CTL2
Quote:
SORT FIELDS=(1,5,PD,A,6,2,PD,A)
MODS E35=(ICE35DU,12288)
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE222A 0 450 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 195 BYTE LRECL FOR T1
The first file length is 195 and the other file length is 450.....
This erroneously tries to MOD 450-byte records at the end of T1 which was previously created with LRECL=195. You can't do that. With MOD, all of the records must be the same length.
Of course, I don't know exactly what you're trying to do so I'd only be guessing at how to fix it, but creating T1 with LRECL=450 would allow the 450-byte records to be MODed on to T1:
Thanks Frank for the quick reply....I have achieved my objective of appending the required field to the first file which was of length 195. The new file created is of length 211.
Jcl Used :-
Hi Frank,
Requirement :-
IN1 :- PS File having LRECL = 195 ; keys(2,5 and 7,2)
IN2 :- PS File having LRECL = 450 ; keys(1,5 and 6,2)
The o/p resultant file should contain all the fields of IN1 and one field from IN2 after the records are matched.
JCL Used :-
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You have several problems including not using MOD for T1, using OUTREC instead of OUTFIL for CTL1CNTL and CTL2CNTL (you must use OUTFIL with SELECT or SPLICE, not OUTREC) and setting the T1 length to 450 for the first file and then to 211 for the second file. Actually, I don't see how the job you show would have run without giving you an error message.
If I understand correctly what you want, this DFSORT/ICETOOL job should do it:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
OUTFIL can be used for one output file or for many output files. OUTFIL has many functions such as reporting, sampling, repeating, converting FB to VB or VB to FB, etc that you might want to use with only one output file, or with many output files. For SELECT and SPLICE, you can use an INREC statement and OUTFIL statements, but you can't use an OUTREC statement (it's just a matter of the way these operators are processed).
if record length of the input is greater than the OUTCNT1 then this code works fine.
otherwise When record lenght is less than OUTCNT1 ( say 27), i got the following message
Code:
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE222A 0 27 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 80 BYTE LRECL FOR OUTCNT1
ICE751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E9-K06751 E7-K11698
This is a generic step and the record length of the files may vary.
Please help me with this.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
drajagopal,
This can't be your actual ICETOOL job because the FROM ddnames don't match up with the actual ddnames. You use FROM(INFILE) and FROM(OUTFILE) but you don't have an INFILE or OUTFILE DD. You have INFILE1 and INFILE2 DDs.
Also you say
Quote:
if record length of the input is greater than the OUTCNT1 then this code works fine.
otherwise When record lenght is less than OUTCNT1 ( say 27), i got the following message
But OUTCNT1 doesn't have an LRECL so what do you mean by "when record length is less than OUTCNT1"?
To get the error message you say you got, I suspect you have LRECL=80 for OUTCNT1 and FROM(INFILE1) and FROM(INFILE2). If that's the case, then you can either remove LRECL=80 from OUTCNT1 or change your OUTFIL statement to: