View previous topic :: View next topic
|
Author |
Message |
sudhaaa
New User
Joined: 24 Mar 2005 Posts: 51
|
|
|
|
Hi,
One simple question
DCL VALUE FIXED DEC(4)
GET EDIT ( VALUE ) (F(5,2);
What will VALUE contains?
Thanks in advance... |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi,
Quote: |
DCL VALUE FIXED DEC(4)
GET EDIT ( VALUE ) (F(5,2); |
Your code is not proper check the following example.
Code: |
GET EDIT(Name,Data,Salary)(A(N),X(2),A(6),F(6,2))
In the above example
First N characters are assigned as characters to Name
Next two characters are skipped
Next six characters are assigned to data as characters
Next Six Characters are considered as optionally signed decimal fixed point constant and assigned to salary. |
|
|
Back to top |
|
|
sudhaaa
New User
Joined: 24 Mar 2005 Posts: 51
|
|
|
|
Hi Sudheer,
What you said is correct if I DCL as you said. I just wanna know How CONVERSION will takes place in my request(ie. FIXED DEC to F(5,2)).
If anything wrong in my code, please correct it.
Regards,
Sudhaaa |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
|
|
Hi,
Our code:
DCL VALUE FIXED DEC(4)
GET EDIT ( VALUE ) (F(5,2);
Let us consider:
DCL VALUE FIXED DEC(4);
GET EDIT (VALUE) (F(5,2));
If 1234 is the input,then the value is taken as 12.34(GET statement) and while trying to move to memory allocated (DCL statement),format of data is checked and so 12.34 is rounded to 12 and stored.
Do correct me on my mistake(s).
Thanks!
Sridevi. |
|
Back to top |
|
|
|