View previous topic :: View next topic |
Author |
Message |
nag77 Beginner
Joined: 03 Jan 2006 Posts: 11 Topics: 8
|
Posted: Sat Jan 28, 2006 8:30 am Post subject: Pad Zeroes for a Numeric item |
|
|
Hi
I have one variable named as numeric-item with SIZE 10.
Some NIs are with size 5 and 0
NI
-----
1243231231
1243231231
12432BBBBB
12432BBBBB
BBBBBBBBBB
B denotes Blank Space.
If the 6th-10th bytes are not available or NI field is spaces ,I have to insert zeros in the spaces, i mean the vales of NI should be like
NI
-----
1243231231
1243231231
1243200000
1243200000
0000000000
How can I do this by using COBOL commands..
Thanks in Advance..
Cheers,
NAG |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Sat Jan 28, 2006 10:22 am Post subject: |
|
|
nag77,
Code: |
INSPECT NI REPLACING ALL ' ' BY '0'
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|