change in FILLER value ?

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
coolrinks5
Member
Posts: 7
Joined: Sat Dec 19, 2009 4:20 pm
Location: India

change in FILLER value ?

Post by coolrinks5 » Thu Jan 21, 2010 2:04 pm

I have one doubt. Suppose i have a group variable 'EMPLOYEE-DATA' as below.

000900 01 EMPLOYEE-DATA.
001000 05 FILLER PIC X(4)
001100 VALUE "Emp ".
001200 05 EMP-NUMBER PIC 9999.
001300 05 FILLER PIC X(7)
001400 VALUE " earns ".
001500 05 EMP-HOURLY PIC Z9.99.


if i perform a MOVE operation like,

004600 MOVE "No more employees." TO EMPLOYEE-DATA.

What will my output be in case of the following ?

(a) DISPLAY EMPLOYEE-DATA.
(b) DISPLAY EMP-NUMBER.
(C) will the value of first FILLER will change to "No m" ?
Regards,
Rakesh

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Jan 21, 2010 2:15 pm

What should happen, per you; a small test would reveal all what is hidden in the riddle.
Regards,
Anuj

coolrinks5
Member
Posts: 7
Joined: Sat Dec 19, 2009 4:20 pm
Location: India

Post by coolrinks5 » Thu Jan 21, 2010 6:08 pm

as per my guess,

a) will not display or give error.
b) same as above
c) no idea abt FILLER situation.. :cry:

coolrinks5
Member
Posts: 7
Joined: Sat Dec 19, 2009 4:20 pm
Location: India

Post by coolrinks5 » Mon Jan 25, 2010 12:43 am

can anybody please let me know if i m correct or wrong ?
Regards,
Rakesh

Aparna Vipin
Member
Posts: 10
Joined: Thu Apr 09, 2009 3:11 pm

Post by Aparna Vipin » Wed Feb 17, 2010 8:52 am

Here goes the answer----->

a) DISPLAY EMPLOYEE-DATA.
Ans:NO MORE EMPLOYEES.

(b) DISPLAY EMP-NUMBER.
Ans:ORE

(C) will the value of first FILLER will change to "No m" ?
Ans :Yes

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others