View previous topic :: View next topic |
Author |
Message |
haseen_mohammed Beginner
Joined: 20 Feb 2006 Posts: 27 Topics: 14
|
Posted: Thu Jan 18, 2007 10:10 am Post subject: Taking a value to Signed variable |
|
|
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
TIA
Haseen |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Jan 18, 2007 10:16 am Post subject: |
|
|
try NUMVAL, or NUMVAL-C _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
dz Beginner
Joined: 02 Apr 2006 Posts: 26 Topics: 0
|
Posted: Thu Jan 18, 2007 10:37 am Post subject: |
|
|
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 |
|
|
haseen_mohammed Beginner
Joined: 20 Feb 2006 Posts: 27 Topics: 14
|
Posted: Fri Jan 19, 2007 5:21 am Post subject: |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Jan 19, 2007 7:23 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|