Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DFSORT Issue - Creation of two outputs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT Issue - Creation of two outputs
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    Post subject: Reply to: DFSORT Issue - Creation of two outputs
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    Post subject:
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    Post subject: Reply to: DFSORT Issue - Creation of two outputs
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: 578
Location: USA

PostPosted: Thu Aug 12, 2010 2:41 am    Post subject:
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    Post subject: Reply to: DFSORT Issue - Creation of two outputs
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    Post subject:
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: 578
Location: USA

PostPosted: Thu Aug 12, 2010 4:29 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us