Mainframe Interview questions on DB2, COBOL and JCL.

All sort of Mainframes Interview Questions.
Post Reply
Wilson SA
New Member
Posts: 1
Joined: Sun Feb 15, 2015 3:03 pm

Mainframe Interview questions on DB2, COBOL and JCL.

Post by Wilson SA »

Hi,

Listed below are some o the questions which I faced
  • 1. There are two tables Table1 and Table2. Table1 has EMPNO and NAME and Table2 has EMPNO and Salary. How to get EMPNO, Name and maximum salary of any employee from these two tables.

    2. In one of my input files, I have data in the format shown below:

    Code: Select all

    ###123abcde 
    ####  45efghi 
    #asdfasd 
    
    How do you remove the leading space and # using COBOL?

    To help further, final output should be like this:

    Code: Select all

    123abcde 
    45efghi 
    asdfasd
    
    3. How JES comes to picture, will it execute internally ?
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Mainframe Interview questions on DB2, COBOL and JCL.

Post by zprogrammer »

Hi Wilson,

It would be great if you had let us know what you have answered. But anyway please find my responses below

1.

Code: Select all

SELECT A.EMPNO,A.NAME,B.SALARY
FROM TABLE1 A,TABLE2 B
WHERE 
	 A.EMPNO = B.EMPNO
AND B.SALARY=(SELECT MAX(SALARY) FROM TABLE2)
2.Inspect VARIABLE ánd tally for '#' and SPACES and store in tallycount
so once you get the result

Code: Select all

MOVE VARIABLE(tallycount+1:) TO DESTINATION
3.JES is JOB Entry subsystem and very well explained in IBM manual
Read more on that in the below links

http://publibz.boulder.ibm.com/cgi-bin/ ... 0814232208 (JES2: Chapter 1)
http://publibz.boulder.ibm.com/cgi-bin/ ... 0814232208 (JES2 : Chapter 3)
http://publibz.boulder.ibm.com/cgi-bin/ ... 152515#4.3 (JES3 : Read chapter 1,2 and 4)
zprogrammer
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”