IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding CONVERSION


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Wed Jun 22, 2005 12:13 pm
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
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 23, 2005 2:51 pm
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: 51

PostPosted: Thu Jun 23, 2005 4:23 pm
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: 104
Location: Concord, New Hampshire, USA.

PostPosted: Thu Sep 22, 2005 9:23 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts SMF Record Date conversion failing CLIST & REXX 1
No new posts Assembler class assignment: stuck on ... PL/I & Assembler 12
Search our Forums:

Back to Top