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
 

 

Error with overlapping fields in OUTREC - was DFSORT error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Error with overlapping fields in OUTREC - was DFSORT error
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Jul 10, 2012 3:53 pm    Post subject: Reply to: DFSORT error
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

Senior Member


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

PostPosted: Tue Jul 10, 2012 5:57 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Jul 10, 2012 6:39 pm    Post subject: Reply to: DFSORT error
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    Post subject:
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

Senior Member


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

PostPosted: Wed Jul 11, 2012 7:58 pm    Post subject:
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    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 How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am


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