View previous topic :: View next topic
|
Author |
Message |
Ron Klop
New User
Joined: 28 Sep 2012 Posts: 28 Location: holland
|
|
|
|
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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
Ron Klop
New User
Joined: 28 Sep 2012 Posts: 28 Location: holland
|
|
|
|
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 |
|
 |
Ron Klop
New User
Joined: 28 Sep 2012 Posts: 28 Location: holland
|
|
|
|
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 |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
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 |
|
 |
Ron Klop
New User
Joined: 28 Sep 2012 Posts: 28 Location: holland
|
|
|
|
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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
 |
Ron Klop
New User
Joined: 28 Sep 2012 Posts: 28 Location: holland
|
|
|
|
Ok, I will give it a try oen of these days and eventually post it if succeeded. Thnx |
|
Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
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 |
|
 |
|
|