I am trying to do a lookup operation within a file,
file1 is my input file with 1-9 chars as key and this same key may present in cols 51 thru 59. Now I need to change the rows which has the matching key with sum text and non-matching with some specified text.
If I hard code the values, its working fine... but if give the position of the key its not working... It says "ICE111A E REFORMATTING FIELD ERROR
".
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Well, you can't be using A for the symbol name because that's a reserved word and you'd get an error message for it. So assuming you're using something valid (like a), your CHANGE operand would be translated to:
1,9,CHANGE=(9,1,9,51,9)
This is NOT valid syntax for CHANGE. The format is (v,find,set) where v is the length (9 in your case), find is a constant and set is a field or constant. You have a field for find instead of a constant.
Quote:
If I hard code the values, its working fine
Not if you hardcoded (9,1,9,51,9). You'd get the same ICE111A.
If you're trying to change 1-9 to 'NOT FND' if it doesn't match 51-59, then you would do that with IFTHEN/OVERLAY as follows: