View previous topic :: View next topic
|
Author |
Message |
yianis
New User
Joined: 14 Aug 2006 Posts: 45
|
|
|
|
Hi,
I need to repalce leading zeroes with blanks..I cannot find a EDIT MASK that does this...
Input
Code: |
----+----1----+----2----+----3--
********************************
00011000106477301
|
Column 01 replace leading zeores (lenght 15)
Thanks |
|
Back to top |
|
|
yianis
New User
Joined: 14 Aug 2006 Posts: 45
|
|
|
|
Oh yeah the leading zeroes vary..
Code: |
00011000106477301
00011000115214901
00001000116593501
01000166716789901
|
|
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi yianis,
U can declare another variable
05 WS-MASK-VAR PIC Z(14)9(1).
Move ur variable to WS-MASK-VAR.Display it. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi yianis,
I provide the solution for cobol. In case if u want to use it sort I will come back to u. |
|
Back to top |
|
|
yianis
New User
Joined: 14 Aug 2006 Posts: 45
|
|
|
|
Thanks,
I think all I have to do is
OUTREC BUILD=(1,08,
09,16,ZD,EDIT=(IIIIIIIIIIIIIIII),
25,24)
This is my real example... I have a field in position 09 for a length of 16. This field contains spaces in front of it too.
Sample Data:
This seems to work...
Code: |
----+----1----+----2----+----3----+----4----+---
00082286 80272373107906002 0014419
00082286 0880272370107906002 0014419
00082286 0880051260107906002 0014427 |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
DFSORT's M10 edit mask will do that. For example:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
00011000106477301
00011000115214901
00001000116593501
01000166716789901
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(1:1,17,ZD,M10,LENGTH=17)
/*
|
|
|
Back to top |
|
|
yianis
New User
Joined: 14 Aug 2006 Posts: 45
|
|
|
|
Thanks Frank ! |
|
Back to top |
|
|
|