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

INVALID FIELD OR CONSTANT IN SORTOF ??


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

New User


Joined: 28 Sep 2012
Posts: 28
Location: holland

PostPosted: Wed Jan 11, 2017 3:44 pm
Reply with quote

Hai

I have two inputfiles of 664 positions long. And four outputfiles of 664 positions.
When I ran my job with the coding beneath, it crashes saying:
Code:
ICE221A 1 INVALID FIELD OR CONSTANT IN SORTOF04 IFTHEN 0 CONDITION 1 
ICE751I 0 C5-I37056 C6-I35396 C7-I35396 C8-I35396 E9-I35396 E7-I37056


            JOINKEYS FILE=F1,FIELDS=(2,9,A,61,10,A,74,3,A)           
            JOINKEYS FILE=F2,FIELDS=(2,9,A,61,10,A,74,3,A)           
            JOIN UNPAIRED,F1,F2                                       
            REFORMAT FIELDS(F1:1,664,F2:1,664),FILL=X'FF'             
            SORT FIELDS=COPY                                         
            OUTFIL FILES=03,INCLUDE=(665,1,CH,EQ,X'FF'),BUILD=(1,664)
            OUTFIL FILES=02,INCLUDE=(1,1,CH,EQ,X'FF'),BUILD=(665,664)
            OUTFIL FILES=04,INCLUDE=(1,664,CH,EQ,665,664,CH),       
            BUILD=(1,664)                                             
            OUTFIL FILES=01,SAVE,BUILD=(665,664)         


Previously I ran the same coding with two files of 130 positions and that ran fine. Foor this job ofcourse 664 was changed in 130 and 665 in 131.

Does anyone know why it goes wrong now??

Thnx very much
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: Wed Jan 11, 2017 5:23 pm
Reply with quote

If you poke the message reference into a search-engine, you should get to the description in the KnowledgeCentre, which will lead to this:

Quote:
the length for a field with a format other than SS was greater than 256


I suggest you use the match-marker in the REFORMAT statement, a ? (question-mark) which you then test for 1 (on 1, not on 2), 2 (on 2 not on 1) and B (a match), which will simplify things (you don't need the FILL) and to do your test you'll have to split the field into multiple ones.
Back to top
View user's profile Send private message
Ron Klop

New User


Joined: 28 Sep 2012
Posts: 28
Location: holland

PostPosted: Wed Jan 11, 2017 6:15 pm
Reply with quote

Ok Bill

i am rather new to this. I understand thta the recordlenght of 664 is too big and that 256 is the max?

I wil have to find out what you mean with match-marker

thnx
Ron
Back to top
View user's profile Send private message
Ron Klop

New User


Joined: 28 Sep 2012
Posts: 28
Location: holland

PostPosted: Wed Jan 11, 2017 6:59 pm
Reply with quote

Hmm, the marker only gives me three options.

I would like four options:
1. only in F1
2. only F2
3. in F1 and F2 and changed
4. in F1 and F2 and not changed

Is there somewhere an example?

thnx
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jan 11, 2017 7:38 pm
Reply with quote

Ron,

Bill has pointed out above exactly what needs to be done,
ie., to use the match marker (?) instead of the FILL approach. That is just a better way of getting the matched and unmatched records.

And the hint to solve your error is here.
Bill Woodger wrote:

you'll have to split the field into multiple ones

Something like.
Code:
OUTFIL FILES=04,INCLUDE=(1,256,CH,EQ,665,256,CH,AND,.....),
Back to top
View user's profile Send private message
Ron Klop

New User


Joined: 28 Sep 2012
Posts: 28
Location: holland

PostPosted: Wed Jan 11, 2017 8:53 pm
Reply with quote

Arun

thnx very much.
When the match marker has the value B does that mean that the key, as specified in JOINKEYS, appears in both files?
But concerning the B value I want to know two situations:
1. key in both files and no values of attributes changed
2. key in both files but there is a change of values of atributes

How do I do that?
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: Wed Jan 11, 2017 9:03 pm
Reply with quote

You test for the B, and then, as Arun has shown, split your test for more than 256 characters into multiple tests for 256-byte fields, twice, and a final one for the balance of the bytes, connected with AND.
Back to top
View user's profile Send private message
Ron Klop

New User


Joined: 28 Sep 2012
Posts: 28
Location: holland

PostPosted: Wed Jan 11, 2017 9:11 pm
Reply with quote

Ok, I will give it a try oen of these days and eventually post it if succeeded. Thnx
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jan 11, 2017 9:36 pm
Reply with quote

Quote:
When the match marker has the value B does that mean that the key, as specified in JOINKEYS, appears in both files?
Yes, just the keys, and not the rest of the data. Good luck!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top