View previous topic :: View next topic |
Author |
Message |
biswadeep_hota Beginner
Joined: 09 Jan 2005 Posts: 2 Topics: 2
|
Posted: Sun Jan 09, 2005 6:00 am Post subject: PL1- Not able to display FIXED DEC (7,2) |
|
|
I have a variable 'A' havinf PIC clause: FIXED DEC (7,2)
The value stored is 93.74
When I move it to a variable PIC'(05)9.99' it shows a value of 00000.93
When I move it to a variable PIC'(05)9V99' It displays 0009374
I want 00093.74 to be displayed..
Its in PL1
Ne help guyzzzzzz 8)
Deep |
|
Back to top |
|
|
bauer Intermediate
Joined: 10 Oct 2003 Posts: 315 Topics: 49 Location: Germany
|
Posted: Mon Jan 10, 2005 3:19 am Post subject: |
|
|
Hi,
specify PIC like sample below or use CHAR builtin function.
TEST: PROC OPTIONS (MAIN) REORDER ;
DCL X DEC FIXED(7,2) AUTO INIT(93.74) ;
DCL Y PIC '(5)9V.99' ;
Y = X ;
PUT SKIP EDIT(CHAR(X))(A);
PUT SKIP EDIT(Y)(A);
END; |
|
Back to top |
|
|
|
|