IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reformating a amount field in the file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prem.y

New User


Joined: 09 Feb 2011
Posts: 7
Location: Hyderabad

PostPosted: Tue Apr 05, 2011 1:37 pm
Reply with quote

Hi All,

I have data like below in a file.

Code:


C(1-10)
----------
-456.99 
22479   
9289   
26659.13
39999   
-34859 



But i need data should be like this:

Code:


-000456.99 
+022479.00   
+009289.00   
+026659.13
+039999.00   
-034859.00



Please let me know how we can do this using COBOL program?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 05, 2011 2:56 pm
Reply with quote

There is a link to manuals at the top of this page. Click on it, find the COBOL Language Reference manual, and read up on the NUMVAL function.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top