The value in &field needs to be surrounded by quotes. You'll have to *cat it up or build an interim variable. See code below. First example returned value "X" and 'XA' Second example returned only 'X'
Code
The value in &field needs to be surrounded by quotes. You'll have to *cat it up or build an interim variable. See code below. First example returned value "X" and 'XA' Second example returned only 'X'
Code
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
Ed, If you're still having this problem and haven't found a more gracious solution, see code below. It definitely gets the job done. Mike
Code