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 

Taking a value to Signed variable

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


Joined: 20 Feb 2006
Posts: 27
Topics: 14

PostPosted: Thu Jan 18, 2007 10:10 am    Post subject: Taking a value to Signed variable Reply with quote

Hi,

In my program I will get an input like +12345.67 or -12345.67 thru file. I need to take this value into S9(5)V99 to process inside the program.

One method is taking the value into a group variable which is cut as sign (X(01)) , before decimal, decimal (X(01)) and after decimal. then process based on sign to get the S9(5)V99 value.

Is there any easier method than this?
Which COBOL directly supports or some tricky way Smile

TIA

Haseen
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Jan 18, 2007 10:16 am    Post subject: Reply with quote

try NUMVAL, or NUMVAL-C
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
dz
Beginner


Joined: 02 Apr 2006
Posts: 26
Topics: 0

PostPosted: Thu Jan 18, 2007 10:37 am    Post subject: Reply with quote

COBOL has so-called "de-editing" capabilities. Define input fied as edited
(PIC -------.99 ), and move the edited field to a numeric field
(PIC S9(5)V99) before doing anything
Back to top
View user's profile Send private message
haseen_mohammed
Beginner


Joined: 20 Feb 2006
Posts: 27
Topics: 14

PostPosted: Fri Jan 19, 2007 5:21 am    Post subject: Reply with quote

HI,

Quote:

COBOL has so-called "de-editing" capabilities. Define input fied as edited
(PIC -------.99 ), and move the edited field to a numeric field
(PIC S9(5)V99) before doing anything


I tried this method.. it s not working ..abending while trying to move.

Quote:

try NUMVAL, or NUMVAL-C


Can someone help me how to use this ..if possible with example ..
Am not sure with the usage ..

Will be of Great help !!

Thanks,
Haseen
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Jan 19, 2007 7:23 am    Post subject: Reply with quote

These are intrinsic functions, that can be found in any COBOL Language reference which can be found in the links provided at the top of this page under Quick Manuals
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jan 19, 2007 9:11 am    Post subject: Reply with quote

haseen_mohammed,

If you had put little effort and searched the application programming forum for "numval" you would have found these.

http://www.mvsforums.com/helpboards/viewtopic.php?t=7518&highlight=numval

http://www.mvsforums.com/helpboards/viewtopic.php?t=6153&highlight=numval

Hope this helps...

Cheers

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