|
View previous topic :: View next topic
|
| Author |
Message |
coxdavi
New User
Joined: 12 Mar 2009 Posts: 30 Location: usa
|
|
|
|
I have a user that is running a sort with SORTIN DD and two outputs for her header and detail files. She is ending her job with completion code u0027 and message: ICE027A 3 END OF FIELD BEYOND MAXIMUM RECORD LENGTH. We did the test to see if her record lengths were indeed correct and they are correct ( SORT and END statements alone ). How can she set up her input and outputs so she can split out her header and detail records ? Her input file is lrecl of 250 and she is creating her outputs at lrecl 300.
Thanks,
Dave |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
coxdavi,
Post the control cards you/she used and we will show you a way to do it. |
|
| Back to top |
|
 |
coxdavi
New User
Joined: 12 Mar 2009 Posts: 30 Location: usa
|
|
|
|
SKolusu,
Here is the code:
| Code: |
0 SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,2,BI,EQ,X'04B0'),
BUILD=(1:1,2,BI,EDIT=(IIIT),
5:3,100)),
IFTHEN=(WHEN=(1,2,BI,EQ,X'04C4'),
BUILD=(1:1,2,BI,EDIT=(IIIT),
5:3,132,
137:135,3,PD,EDIT=(SIIIIT),SIGNS=(+,-),
143:138,3,PD,EDIT=(SIIIIT),SIGNS=(+,-),
149:141,15,
164:156,5,PD,EDIT=(SIIT.TTT),SIGNS=(+,-),
172:161,2,
174:163,5,PD,EDIT=(SIIIIT.TT),SIGNS=(+,-),
183:168,5,PD,EDIT=(SIIT.TTT),SIGNS=(+,-),
191:173,3,PD,EDIT=(SIIIIT),SIGNS=(+,-),
197:176,31))
OUTFIL FNAMES=SORTHR,INCLUDE=(1,4,BI,EQ,C'1200')
OUTFIL FNAMES=SORTDTL,INCLUDE=(1,4,BI,EQ,C'1220')
OUTREC FIELDS=(1,300)
DEBUG ABEND
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE027A 3 END OF FIELD BEYOND MAXIMUM RECORD LENGTH
ICE751I 0 C5-K48846 C6-K90014 C7-K45047 C8-K46331 E9-K47759 E7-K48846
ICE052I 3 END OF DFSORT |
Thanks for any help you can offer.
Dave |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
use the following control cards
| Code: |
//SYSIN DD *
SORT FIELDS=COPY
INREC IFOUTLEN=300,
IFTHEN=(WHEN=(1,2,BI,EQ,X'04B0'),
BUILD=(1:1,2,BI,EDIT=(IIIT),
5:3,100)),
IFTHEN=(WHEN=(1,2,BI,EQ,X'04C4'),
BUILD=(1:1,2,BI,EDIT=(IIIT),
5:3,132,
137:135,3,PD,EDIT=(SIIIIT),SIGNS=(+,-),
143:138,3,PD,EDIT=(SIIIIT),SIGNS=(+,-),
149:141,15,
164:156,5,PD,EDIT=(SIIT.TTT),SIGNS=(+,-),
172:161,2,
174:163,5,PD,EDIT=(SIIIIT.TT),SIGNS=(+,-),
183:168,5,PD,EDIT=(SIIT.TTT),SIGNS=(+,-),
191:173,3,PD,EDIT=(SIIIIT),SIGNS=(+,-),
197:176,31))
OUTFIL FNAMES=SORTHR,INCLUDE=(1,4,BI,EQ,C'1200')
OUTFIL FNAMES=SORTDTL,INCLUDE=(1,4,BI,EQ,C'1220')
|
|
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
Kolusu,
Should the last OUTFIL INCLUDE statement have ZD or CH? Because this field was converted using EDIT ?
Thanks, |
|
| Back to top |
|
 |
coxdavi
New User
Joined: 12 Mar 2009 Posts: 30 Location: usa
|
|
|
|
Thanks Kolusu. That did the trick. The user is very happy with the results.
Dave |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
| sqlcode1 wrote: |
Kolusu,
Should the last OUTFIL INCLUDE statement have ZD or CH? Because this field was converted using EDIT ?
Thanks, |
No. In this case the comparison is done as if it is a CHARACTER string. BI is the only format to handle decimal as well as character constants. |
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
Kolusu,
Thanks for the information.
Just noticed I have used similar comparisons (knowingly or unknowingly) in some of my test jobs but didn't pay attention to the details.
Thanks, |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|