Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us