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

Error with overlapping fields in OUTREC - was DFSORT error


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

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Tue Jul 10, 2012 3:39 pm
Reply with quote

I used the following DFSORT code. I am getting the error as

ICE126A 0 INCONSISTENT REFORMATTING FOR *OUTREC : REASON CODE 04, IFTHEN 0

Code:
//AFSRT2  EXEC PGM=SORT,REGION=4096K

//SORTIN   DD  DSN=I/P dataset(LRECL 119),DISP=SHR
//SORTOUT  DD  DSN=O/P dataset(LRECL 55),DISP=(NEW,CATLG)
//SYSIN    DD  *
  SORT FIELDS=COPY
  OUTREC FIELDS=(1:1,13,
                            14:21,11,
                            25:93,2,
                            27:95,9,
                            36:41,3,
                            39:2C'  ',
                            41:70,5,
                            46:80,5,
                            51:107,5)
/*


Please let me know what is going wrong here?

Your post has been Code'd.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 10, 2012 3:53 pm
Reply with quote

The Code tags have been used on your post, to preserve spacing by using a fixed font like your mainframe screen.

Have you looked up the message?

Please do so and let us know, with the Reason Code.

Once you have done that, and with the error no longer "hidden" by being under the default posting formatting, it should be easy to spot where you have not allowed enough space before starting the next field.

An easy way to avoid the problem and to make the card easier to write, read and understand is to not include a column for each field. In fact with FIELDS (to my mind it is clearer to use the equivalent BUILD) you don't need to specify any columns usuall except for "padding".
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Jul 10, 2012 5:57 pm
Reply with quote

First I believed you're telling about us the error-message generated from the "JCL syntax-checker" and I thought that's an intelligent tool which you might be using at your shop. Because had you executed this, these filelds, from your SYSIN card,
Code:
14:21,11,
25:93,2,
should give you
Code:
OUTREC  HAS OVERLAPPING COLUMNS SPECIFIED
but message is of type ICExxxA icon_confused.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 10, 2012 6:39 pm
Reply with quote

Anuj, the problem with JCL checkers and DFSORT cobntrol cards is that even statements which have been available for years can be rejected as "errors".
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Jul 10, 2012 9:54 pm
Reply with quote

kumar_jalluri,

You have overlapping fields at position 39 and 41. You coded 39:2C' ', which is giving you 4 spaces starting from 39 and ending up at 42. I guess you just wanted 2 spaces. You can either code 39:C' ', or 39:2x which will give you 2 spaces.

so change your control cards to the following
Code:

  SORT FIELDS=COPY               
  OUTREC FIELDS=(1:1,13,       
                 14:21,11,     
                 25:93,2,     
                 27:95,9,     
                 36:41,3,     
                 39:2X,       
                 41:70,5,     
                 46:80,5,     
                 51:107,5)     


Anuj,

There is nothing wrong about the 2 fields you shown.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Jul 11, 2012 7:58 pm
Reply with quote

Thanks Kolusu, I've quoted the wrong fields. Perfect eyes but poor eye-sight...icon_redface.gif.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DFSORT Join Keys Controlcard DFSORT/ICETOOL 4
No new posts U0016 error in JCL JCL & VSAM 4
No new posts Simplify SORT CARD to combine INREC a... DFSORT/ICETOOL 6
No new posts python on z/OS error no encoding decl... Testing & Performance 0
No new posts Partial Sort conditions for PD fields DFSORT/ICETOOL 16
Search our Forums:


Back to Top