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

Convert character to numeric


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Thu Dec 08, 2011 10:43 pm
Reply with quote

Hi,

I have a file in .txt format. It is FTPd from the mainframe and I can use only the .txt fil as my program input. Starting from position 507, there is a amount value which I need to pick up to do some calculation.

The value is 0021000. From the mainframe copybook I came to know that the field description is as 9(5)V99.

As per my understanding is the amount here is 210.00.

Can any one tell me how would i can have this value?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 08, 2011 11:23 pm
Reply with quote

Define the field like that, use it. It is exactly how it would look on any other dataset, according to your example.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Dec 09, 2011 12:08 am
Reply with quote

Gosh, you want the edited value? Move tje PIC 9(5)V99 it to a PIC Z(4)9.99 field.
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Fri Dec 09, 2011 4:32 am
Reply with quote

Thanks Bill..It worked
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Dec 09, 2011 4:56 am
Reply with quote

Glad it was what you wanted. Thanks for letting us know.
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top