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
 
[Solved]What's the output of this COBOL Program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
rambabu
Currently Banned

Active User


Joined: 18 Apr 2005
Posts: 67

PostPosted: Mon Jun 13, 2005 2:45 pm    Post subject: What's the output of this COBOL Program
Reply with quote

what is the out of the below program?
01 emp
05 eno pic 999.
05 ename z(4).
move 19 to eno.
move emp to ename.
display emp.
display eno.
display ename.
Back to top
View user's profile Send private message
References
kvivek

Active User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Mon Jun 13, 2005 6:42 pm    Post subject:
Reply with quote

display emp - 019
display eno - 019
display ename - SPACES

Regards,
Vivek
Back to top
View user's profile Send private message
vel2k8

New User


Joined: 10 Jun 2005
Posts: 11
Location: Jacksonville

PostPosted: Tue Jun 14, 2005 10:19 am    Post subject: Re: What's the output of this COBOL Program
Reply with quote

Vivek,

I think you are wrong.. This should be the answer..

EMP 0190190
ENO 019
ENAME 0190

Thanks
Vel.
Back to top
View user's profile Send private message
kvivek

Active User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Wed Jun 15, 2005 8:48 pm    Post subject:
Reply with quote

Vel,

You are correct... Sorry I haven't seen "move emp to ename" statement.

Regards,
Vivek
Back to top
View user's profile Send private message
sudheer648

Active User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 11:48 am    Post subject: Re: What's the output of this COBOL Program
Reply with quote

Hi rambabu,

ENO will be 019 b'coz it moves values from right.
ENAME will 0190 b'coz it moves data from left.
EMP it is group item it is printing both eno and ename.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1