Have you considered using the INCCHAR parm instead of the INCREL? This way you would specify the starting position in the file for the comparison string thus allowing you to use 6 positions instead of 9. I think that is itself is your problem.
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
CPYF using *INCREL
Collapse
X
-
CPYF using *INCREL
Hi Ed! What are the attributes of the field in the file? I assume that it's character, length 9? Right now, I don't have a clue as to why it's not working like you (and I) think it should; just looking for more information. The default value for the TOMBR on the CPYF is *FIRST. Is the *FIRST member actually the member that you think it is? I've been bitten by that before.
-
CPYF using *INCREL
Trying to do a CPYF in a CLP (see code below) using a display field (FIELD1). The field has a value of "M12345". The file I am using for my CPYF contains 2 groups of records. 1 group contains the field with the above value, the 2nd group contains the field with the following: "M12345B". I want to copy records in which FIELD1 has the initial value M12345. When the CPYF executes it gives me M12345 and M12345B records. In debugger I see that &FIELD1 looks like 'M12345 ' and that in hex the trailing spaces are in fact blanks //404040//. Does anyone know how to get around this problem and why I am experiencing it? If I were asking for 'M12345' rather than 'M12345 ' I could understand the discrepancy. H E L P . . .
Code
Comment
Comment