IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT Issue - Creation of two outputs


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
coxdavi

New User


Joined: 12 Mar 2009
Posts: 30
Location: usa

PostPosted: Thu Aug 12, 2010 1:54 am
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Aug 12, 2010 2:09 am
Reply with quote

coxdavi,

Post the control cards you/she used and we will show you a way to do it.
Back to top
View user's profile Send private message
coxdavi

New User


Joined: 12 Mar 2009
Posts: 30
Location: usa

PostPosted: Thu Aug 12, 2010 2:15 am
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Aug 12, 2010 2:29 am
Reply with quote

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
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Aug 12, 2010 2:41 am
Reply with quote

Kolusu,
Should the last OUTFIL INCLUDE statement have ZD or CH? Because this field was converted using EDIT ?

Thanks,
Back to top
View user's profile Send private message
coxdavi

New User


Joined: 12 Mar 2009
Posts: 30
Location: usa

PostPosted: Thu Aug 12, 2010 2:59 am
Reply with quote

Thanks Kolusu. That did the trick. The user is very happy with the results.


Dave
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Aug 12, 2010 3:04 am
Reply with quote

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
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Aug 12, 2010 4:29 am
Reply with quote

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. icon_idea.gif

Thanks,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
Search our Forums:

Back to Top