Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Regarding CONVERSION

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER
Author Message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 47

PostPosted: Wed Jun 22, 2005 12:13 pm    Post subject: Regarding CONVERSION
Reply with quote

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
View user's profile Send private message
References
sudheer648

Active User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 23, 2005 2:51 pm    Post subject: Re: Regarding CONVERSION
Reply with quote

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
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 47

PostPosted: Thu Jun 23, 2005 4:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 107
Location: Concord, New Hampshire, USA.

PostPosted: Thu Sep 22, 2005 9:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER All times are GMT + 6 Hours
Page 1 of 1