Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rambabu
Currently Banned

New 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

kvivek

New 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

New 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

New 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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us