SiouxCityElvis
Programmer
I am Unstringing a comma delimited file and writing it to an Indexed file.
On one of the fields, we are expecting only three characters.
field1,2,3,abc,field5,etc...
The problem I'm having is that the people responsable for creating the commadelimited files are screwing up the "abc" field sometimes.
field1,2,3, abc ,field5,etc...
You'll notice that they have a leading space before "abc" and afterwards. Since I am moving this into a PIC X(3) fields before writing to my Indexed file, I am getting inaccurate values stored in my PIC X(3) field.
Is there a way to "trim" the leading spaces? Otherwise we have to "scrub" our raw data before reading it in and writing it to our indexed file.
I was wondering if the JUSTIFY clause would help? If so, how?
Thanks.
-David
On one of the fields, we are expecting only three characters.
field1,2,3,abc,field5,etc...
The problem I'm having is that the people responsable for creating the commadelimited files are screwing up the "abc" field sometimes.
field1,2,3, abc ,field5,etc...
You'll notice that they have a leading space before "abc" and afterwards. Since I am moving this into a PIC X(3) fields before writing to my Indexed file, I am getting inaccurate values stored in my PIC X(3) field.
Is there a way to "trim" the leading spaces? Otherwise we have to "scrub" our raw data before reading it in and writing it to our indexed file.
I was wondering if the JUSTIFY clause would help? If so, how?
Thanks.
-David