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
 

 

OUTREC FILELDS FAILS WITH ICE126A 2 INCONSISTENT REFORMAT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Sat Jul 02, 2016 1:22 am    Post subject: OUTREC FILELDS FAILS WITH ICE126A 2 INCONSISTENT REFORMAT
Reply with quote

Hi ,

I have sort card where i am moving the this-year-* data fields to last-year* data fields and reset this this-year data fields to zero and i am seeing the issue could be in reset the value zero to this-year data fields and i am not sure why it is causing the issue .

Please find the COBOL definition and SORT card :
Code:

01 WS-REC.
   05 WS-KEY              PIC S9(9) USAGE  COMP.
   05 THIS-YEAR-X-AMNT    PIC S9(13)V9(2)  USAGE COMP-3.
   05 THIS-YEAR-Y-AMNT    PIC S9(13)V9(2)  USGAE COMP-3.
   05 THIS-YEAR-X-Y-CNT   PIC S9(9) COMP.
   05 LAST-YEAR-X-AMNT    PIC S9(13)V9(2)  USAGE COMP-3.
   05 LAST-YEAR-Y-AMNT    PIC S9(13)V9(2)  USAGE COMP-3.
   05 LAST-YEAR-X-Y-CNT   PIC S9(9) COMP.
   05 FILLER              PIC X(10).


SORT FIELDS=(1,4,BI,A)
OUTREC FIELDS=(1:1,4,25:5,8,33:13,8,41:21,4,
               5:+0,TO=PD,LENGTH=8,
               13:+0,TO=PD,LENGTH=8,
               21:+0,TO=BI,LENGTH=4,
               45:45,10)


Can anyone please help me on what is the issue with this sort card?.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Sat Jul 02, 2016 2:51 am    Post subject: Reply to: OUTREC FILELDS FAILS WITH ICE126A 2 INCONSISTENT REFORMAT
Reply with quote

Did you look up the reason code associated with the ICE126A message up in the manual? If not, why not start there -- ESPECIALLY since you did not bother to post that critical detail?
Back to top
View user's profile Send private message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Sat Jul 02, 2016 3:22 am    Post subject: Re: Reply to: OUTREC FILELDS FAILS WITH ICE126A 2 INCONSISTENT REFORMAT
Reply with quote

Robert Sample wrote:
Did you look up the reason code associated with the ICE126A message up in the manual? If not, why not start there -- ESPECIALLY since you did not bother to post that critical detail?


Hi Robert,

When i read thru the error description it is found that data that is passed which is inconsistent with the format that is defined . But if if you see i have passed the data correctly according the format defined and also i have tried to pass the value for PD like X'000000000000000C' and again i got the same error .
error i got from my job


Code:

ICE126A 2 INCONSISTENT REFORMATTING FOR *OUTREC : REASON CODE 
04 , IF THEN 0
Back to top
View user's profile Send private message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Sat Jul 02, 2016 3:37 am    Post subject: Re: Reply to: OUTREC FILELDS FAILS WITH ICE126A 2 INCONSISTENT REFORMAT
Reply with quote

Robert Sample wrote:
Did you look up the reason code associated with the ICE126A message up in the manual? If not, why not start there -- ESPECIALLY since you did not bother to post that critical detail?


Hi Robert,

I am sorry, i apologize for not putting the error message in my initial post.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Sat Jul 02, 2016 6:52 am    Post subject:
Reply with quote

Shouldn't that be
Code:
45:41,10
?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Sat Jul 02, 2016 8:51 am    Post subject:
Reply with quote

Quote:
it is found that data that is passed which is inconsistent with the format that is defined
Actually, the 04 reason code does not mean this at all. From the messages manual:
Quote:
4.A column overlapped the previous output field in the reformatted record.
Example (fixed-length input):
INREC IFTHEN=(WHEN=INIT,
BUILD=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(81,8,ZD,EQ,+1),
BUILD=(3,20,20:C'ABC'))
You read the first paragraph in the error manual, without looking at the reason code (or not understanding what the reason code means) and went off on a wild goose chase for inconsistent formats when your problem was something else entirely.

I took your SORT statements and rearranged them as
Code:
OUTREC FIELDS=(1:1,4,
                5:+0,TO=PD,LENGTH=8,
                13:+0,TO=PD,LENGTH=8,
                21:+0,TO=BI,LENGTH=4,
                25:5,8,33:13,8,41:21,4,
                45:45,10)
so there is no overlapping, and the code worked and produced an output data set. If you read the manual on the OUTREC statement, as I did, you will find that any gaps you leave in your FIELDS will be filled with spaces so you need to put the fields in ascending column sequence when coding it.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Sun Jul 03, 2016 2:25 pm    Post subject: Reply to: OUTREC FILELDS FAILS WITH ICE126A 2 INCONSISTENT REFORMAT
Reply with quote

First don't use FIELDS use BUILD.

Second, don't use columns unless you need them, which you don't here.

BUILD creates a new record, sourced from the original, so there is no need to attempt to reference fields out of order. Your code fails exactly for the reason specified by Robert.

Indeed, for this task, OVERLAY is better, where you would use columns and be concerned with the order. It uses the current record and only changes data specified in the statement.
Back to top
View user's profile Send private message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Tue Jul 05, 2016 9:29 pm    Post subject: Re: Reply to: OUTREC FILELDS FAILS WITH ICE126A 2 INCONSISTENT REFORMAT
Reply with quote

Bill Woodger wrote:
First don't use FIELDS use BUILD.

Second, don't use columns unless you need them, which you don't here.

BUILD creates a new record, sourced from the original, so there is no need to attempt to reference fields out of order. Your code fails exactly for the reason specified by Robert.

Indeed, for this task, OVERLAY is better, where you would use columns and be concerned with the order. It uses the current record and only changes data specified in the statement.


Thanks Bill for your advise ,i have used BUILD instead of Fields.
Back to top
View user's profile Send private message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Tue Jul 05, 2016 9:30 pm    Post subject:
Reply with quote

Robert Sample wrote:
Quote:
it is found that data that is passed which is inconsistent with the format that is defined
Actually, the 04 reason code does not mean this at all. From the messages manual:
Quote:
4.A column overlapped the previous output field in the reformatted record.
Example (fixed-length input):
INREC IFTHEN=(WHEN=INIT,
BUILD=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(81,8,ZD,EQ,+1),
BUILD=(3,20,20:C'ABC'))
You read the first paragraph in the error manual, without looking at the reason code (or not understanding what the reason code means) and went off on a wild goose chase for inconsistent formats when your problem was something else entirely.

I took your SORT statements and rearranged them as
Code:
OUTREC FIELDS=(1:1,4,
                5:+0,TO=PD,LENGTH=8,
                13:+0,TO=PD,LENGTH=8,
                21:+0,TO=BI,LENGTH=4,
                25:5,8,33:13,8,41:21,4,
                45:45,10)
so there is no overlapping, and the code worked and produced an output data set. If you read the manual on the OUTREC statement, as I did, you will find that any gaps you leave in your FIELDS will be filled with spaces so you need to put the fields in ascending column sequence when coding it.


Thanks Robert for your Quick Help and as Bill suggested i have used OUTREC BUILD instead of OUTREC FIELDS.
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 Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts OUTREC RDW NOT INCLUDED krsenthil85 SYNCSORT 10 Fri May 06, 2016 3:22 am
No new posts READQ TS returning inconsistent addre... moezbud CICS 14 Wed May 04, 2016 1:09 am


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