View previous topic :: View next topic
|
Author |
Message |
pnobe
New User
Joined: 30 Aug 2006 Posts: 3
|
|
|
|
Hello all. Thanks for reading this post.
I am writing this to seek help about PUT LIST a FIXED BINARY's value.
The following is the codes:
Code: |
DCL CHAR1 FIXED BINARY(15,5);
CHAR1=3.1415;
PUT SKIP LIST(CHAR1);
|
but it only display 3.12 in the output.
Could anyone tell me how to display the 3.1415;
Thank you in advance.
[/code] |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
In PL/I you do not use scaled FIXED BIN. If you do, you bear the consequences. |
|
Back to top |
|
|
pnobe
New User
Joined: 30 Aug 2006 Posts: 3
|
|
Back to top |
|
|
pnobe
New User
Joined: 30 Aug 2006 Posts: 3
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Thanks for posting what you learned
d |
|
Back to top |
|
|
jerryelvis
New User
Joined: 10 Nov 2009 Posts: 1
|
|
|
|
@pnobe
Hi
as far as FIXED BINARY is concerned it is used only for arthimetic operations. for display function you need to use CHAR.
try this....
DCL CHAR1 CHAR(6) INIT('3.1415');
PUT SKIP LIST(CHAR1);
cheers.. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
jerryelvis wrote: |
@pnobe
Hi
as far as FIXED BINARY is concerned it is used only for arthimetic operations. for display function you need to use CHAR.
try this....
DCL CHAR1 CHAR(6) INIT('3.1415');
PUT SKIP LIST(CHAR1); |
crap
How do you intend to print reports with numbers if you can only print characters? |
|
Back to top |
|
|
|