View previous topic :: View next topic
|
Author |
Message |
vimalprabhakaran
New User
Joined: 13 Feb 2006 Posts: 13
|
|
|
|
I have a field as below
RATE FIXED DEC (13,5);
I need to move this to a CHAR field RATE_CHAR in a file. The field is of type CHAR.
The value in RATE is 123456.12345
In the RATE_CHAR i need to get the value as 0123456.12345
What I have to do for this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
look at the manual for the PIC clause |
|
Back to top |
|
|
vimalprabhakaran
New User
Joined: 13 Feb 2006 Posts: 13
|
|
|
|
Could you pls give me a manual with the same? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Could you pls give me a manual with the same? |
At the top of the page there is a link to "IBM Manuals". On that page, are the PL/I Language Reference and Programming Guide which should be what you need.
If you find something in the manual that is not clear, post what you found and your question about it. Someone will be able to clarify. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Hi Vimal,
You can do it in the following way.
DCL RATE FIXED DEC (13,5) INIT(123456.12345);
DCL RATEP PIC '9999999V.99999';
DCL RATEC CHAR(13);
RATEP=RATE;
RATEC=RATEP;
PUT SKIP LIST('RATE RATEP RATEC: ',RATE,RATEP,RATEC);
and the result is
RATE RATEP RATEC: 123456.12345 0123456.12345 0123456.12345 |
|
Back to top |
|
|
|