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

[Solved]What's the output of this COBOL Program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top