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

Pl/1 Answer required


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ganga79

New User


Joined: 16 Nov 2005
Posts: 23

PostPosted: Thu Jan 22, 2009 9:41 am
Reply with quote

Hi Guys,

Please let me know the answer for the below question

DCL A CHAR(4) INIT('10.5')
DCL B DEC FIXED(7,1) INIT(10.5)

B=A +B

OPTIONS:

A. conversion is raised
b. erorr is raised
c. no condition is raised and the value of B is 21
d.No condition is raised and the value of B is 20.5
e.No condition is raised and the value of B is 20

Regards,
Ganga
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 22, 2009 9:45 am
Reply with quote

Hello,

What happens when you try this on your system?

Put that bit of code in any small program and try it. If you do not understand what happens, post your source via copy/paste, what the result is also via copy/paste and your question about what happened.

Someone here will be able to clarify.
Back to top
View user's profile Send private message
senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Thu Apr 09, 2009 3:04 pm
Reply with quote

Hi ganga,


Code:
DCL A CHAR(4) INIT('10.5')
DCL B DEC FIXED(7,1) INIT(10.5)

B=A +B

d.No condition is raised and the value of B is 20.5
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 09, 2009 8:04 pm
Reply with quote

Hello,

Why is this?
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Maintain LIVE data for many sysplexes... PL/I & Assembler 6
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
No new posts COMPUSET/XICS z/os document required All Other Mainframe Topics 1
No new posts Number of Packages required for stati... DB2 4
Search our Forums:

Back to Top