|
View previous topic :: View next topic
|
| Author |
Message |
kumar_jalluri
New User
Joined: 02 Jun 2005 Posts: 24 Location: PUNE
|
|
|
|
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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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,
should give you
| Code: |
| OUTREC HAS OVERLAPPING COLUMNS SPECIFIED |
but message is of type ICExxxA  |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
| 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 |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Thanks Kolusu, I've quoted the wrong fields. Perfect eyes but poor eye-sight... . |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|