Thanks. That works if I want to print the field without leading and trailing spaces.
How about if I want to do some work with the non-space value digit/characters of this field?
if field is numerics (all 5 digits)
write field to file1
write field to file2.
if field is alpha-numeric (some alpha, some numeric, or all apha, not spaces)
write field to file1
write "1111" to file2.
if field has leading/trailing spaces (remaining vales are numerics)
write with leading zero to file1
write "1111" to file2.
I'm not looking for the code for the above, only how to get the field without the leading/trailing spaces so it can be manipulated.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.