Posted: Fri Jan 24, 2014 4:31 pm Post subject: Leading Zeros
ROW1 001 039
ROW3 040 015 N MASK 'ZZZZZZZZZZZZZZZ'
ROW4 057 015 N HEADING ('REPRESENTMENTS')
ROW5 074 015 N HEADING ('UNPAIDS')
ROW6 092 015 N HEADING ('VALUE< R 100')
ROW7 109 015 N HEADING ('VALUE< R 1000')
ROW8 126 015 N HEADING ('VALUE< R 5000')
ROW9 143 015 N HEADING ('VALUE< R 10000')
ROW10 160 015 N HEADING ('TOTAL VALUE')
Above is the stucture of my output file.
I write this file by moving date in the above fields.
I want leading zeros to be replaced by blanks.I specify mask for ROW3 as shown above but still getting leadiing zeros
In Easytrieve Plus, MASKs are only processed for printed output, from a DISPLAY or PRINT.
When you say "moving dat(a)", do you use MOVE? If so, use an assgnment instead (=), as MOVE does not work how you think it does if you know COBOL. It won't fix your problem, but generally using MOVE for data-items will bite you at some point.
You either have to do some code yourself, "redefiing" it as an A field and testing the bytes in a loop until you reach a non-zero. If you want to do that a lot, you can do it in an Easytrieve Plus macro, or as a File Exit.
What's that ROW1? Did you chop it when doing the copy/paste or does that somehow compile?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum