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 

replace spaces instead of zeros thru COBOL Utility

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


Joined: 25 Apr 2008
Posts: 36
Topics: 8
Location: Baltimore, USA

PostPosted: Wed Mar 25, 2009 9:51 am    Post subject: replace spaces instead of zeros thru COBOL Utility Reply with quote

I have searched but couldnt find the earlier post.

Thru COBOL Program, i want to replace prefix with zeros instead of spaces. My requirement is i have a price field of X(6).X(5) - this field should convert to 9(11)V9(5).
for eg-
Code:
----+----1----+----2----+----3----+----4----+--
PRICE FIELD   -   CONVERT THE PRICE FIELD TO   
123456.12345  -   00000123456.12345           
    45.88888  -   00000000045.88888           
   999.00000  -   00000000999.00000           
      .88000  -   00000000000.88000           
     5.00001  -   00000000005.00001       


More information-
The decimal part X(5) always be fixed and there is NO space allowed, and the period also fixed in the 7th postion of the given price field. I have tried thru redefines and all string handling but unable to get the desired result.

It seems simple, but unable to handle, if some one have posted earlier, please share me the link. Thanks for your help.
Back to top
View user's profile Send private message
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