MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pad Zeroes for a Numeric item

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
nag77
Beginner


Joined: 03 Jan 2006
Posts: 11
Topics: 8

PostPosted: Sat Jan 28, 2006 8:30 am    Post subject: Pad Zeroes for a Numeric item Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Sat Jan 28, 2006 10:22 am    Post subject: Reply with quote

nag77,

Code:

INSPECT NI REPLACING ALL ' ' BY '0'   


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group