View previous topic :: View next topic
|
Author |
Message |
Gousiya Mulla
New User
Joined: 02 Jun 2008 Posts: 87 Location: Bangalore
|
|
|
|
Given : 63.020003
How can we extract values after decimal point using COBOL logic .
Form my end , if it is alphanumeric we can use the String Functions (like substr) to extract . But not sure how it is for numeric ones ......
Please any idea ?? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
how about:
given PIC 9(5)v9(10) value 63.020003.
gt-decimal pic 9(10).
lt-one PIC v9(10).
move given to gt-decimal, lt-one.
after move:
gt-decimal contains 0000000063
lt-one contains 0200030000 |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Gousiya Mulla wrote: |
if it is alphanumeric we can use the String Functions (like substr) to extract |
almost...
STRING is used to concatenate values, UNSTRING is used to split them.
and STRING / UNSTRING are not functions. |
|
Back to top |
|
|
|