Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CONVERSION OF S9(13)V99 INTO INTEGER

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ajaikumar andy robert
Warnings : 1

New User


Joined: 01 Dec 2006
Posts: 23
Location: India

PostPosted: Tue Dec 05, 2006 1:34 am    Post subject: CONVERSION OF S9(13)V99 INTO INTEGER
Reply with quote

hi

i need to convert a field of S9(13)v99 which has a value of -0000000009.00 to a numeric field for the purpose of addition..
i get errors when i try to move this field to an integer directly..
is there any way to convert this easily..

In the file the value is given as -000000000005.0 and i take it as S9(13)v9
pls correct me if i m wrong in this deifinition..
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 05, 2006 2:50 am    Post subject:
Reply with quote

Hello,

The field you have defined should work as-is in an addition.

COBOL fields that are defined with the "v99" ARE the fields typically used in calculations. The v99 is an "implied" decimal. If the data is excatly
-0000000009.00 the picture S9(13)v99 does not match the data.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Dec 05, 2006 7:10 am    Post subject: Re: CONVERSION OF S9(13)V99 INTO INTEGER
Reply with quote

Ajai,

How are you 'seeing' the data on file = "-000000000005.0"? is this a display field? If the field on the file is actually "-000000000005.0", then the definition needs to be -9(12).9 This definition cannot be used in addition and must be moved to another field.

Let me know,

Dave
Back to top
View user's profile Send private message
ajaikumar andy robert
Warnings : 1

New User


Joined: 01 Dec 2006
Posts: 23
Location: India

PostPosted: Tue Dec 05, 2006 7:32 am    Post subject: Re: CONVERSION OF S9(13)V99 INTO INTEGER
Reply with quote

hi,

i m not seeing it as "-000000000005.0"...
it is given in the file as -000000000005.0..
it is one of the values i get in the input file..
i need to add the similar values and write them into another file..
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Dec 05, 2006 7:37 am    Post subject: Re: CONVERSION OF S9(13)V99 INTO INTEGER
Reply with quote

Ajai,

I guess what I'm asking is how do you know it's this value? When I save 'seeing' I mean are you using EDIT or BROWSE, or are you using 'FILE AID' to know the value?

Dave
Back to top
View user's profile Send private message
ajaikumar andy robert
Warnings : 1

New User


Joined: 01 Dec 2006
Posts: 23
Location: India

PostPosted: Tue Dec 05, 2006 8:22 am    Post subject: Re: CONVERSION OF S9(13)V99 INTO INTEGER
Reply with quote

HI

the input comes in a sequential file and i see this value when i open it in edit mode and also in browse mode. even if i used file-aid also the same valus is there..
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Tue Dec 05, 2006 10:17 am    Post subject:
Reply with quote

Hi Ajay

When you open the dataset in edit mode, are you able to see the "-" sign and the decimal point?????...

Thanks
Arun
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us