Interview Questions
Interview Questions
How to implement a commit & restart logic in COBOL program – Ex. A program processing 1 million
records fail after processing 50000 records…how to take care of that scenario..
How to develop a COBOL/DB2 program ? – What will be coded in COBOL (Ex. DCLGEN, SQLCA, EXEC SQL
etc.). Complete bind process, plan, package, access path etc. expected
What is Static and Dynamic call in COBOL ? Need expiation with pros and cons of each. How to call
Statically / Dynamically?
A table contain a column ‘Gender’ with values ‘M’ or ‘F’ – While select how can we get it as ‘Male’ or
‘Female’ and how to take care if value is not ‘M’ or ‘F’…
Group by and order by – Can they both be given in the same SQL ? If so how and what happens ?
Suppose if I declare a field in db2 table with decimal data type field decimal(9,2) in a table,
how many bytes it will take in db2 and how many bytes it will take in cobol? – Basically the candidate is
expected to know the DB2 data types and the equivalent COBOL or PL/1 data types, what are the size of
each etc..
Suppose I want to remove a column from a DB2 table. How will I know what are the programs impacted
because of that (not by searching the COBOL programs)
- Expected answer is by querying one of the SYSIBM.SYSCOLUMNS and joining with
SYSIBM.SYSPACKAGES
COBOL Program A calling Program B – How will be the Linkage section / Procedure division USING etc…?
How to pass parameters from JCL to COBOL – How it will be taken care in COBOL ?
Consider the below Evaluate statement and say which all perform statements will be executed.
X=5
Ans : Only Perform ABCD will be executed. Whichever condition met first will be executed
In the same statements above what will happen if the Otherwise statement is not coded ?
A COBOL program doing computation based on data read from a file..Abends..How to find where it
abended, what values are causing the problem etc??
What situations we get SOC7 abend ? – Ex. Initialized numeric variables used in computation or moving
non-numeric values to numeric variables etc..
A variable with length 100.. It contains value only in the first 10 positions.. How to get only the values
present in the first 10 positions. And how to get that length ? In this case the length should be 10.
Expected answer is usage of Inspect verb to achieve this.
PL/1
File handling in PL/1 - If a file has to be used what are the different steps to code? Is Open file statement
mandatory in PL/1?
PL/1 Built in functions – Ex. Verify, Index, Translate etc..Difference b/w verify & INDEX
JCL
- JCL with 3 steps , Step1, Step2,Step3 Fails in step 2..How to skip Step2 and restart from Step3..
- What are the disposition parameters? What is the diff between MOD & OLD?
- How to do a RESTART on a PROC step?
- How to create a VSAM File?
- How to create a GDG? What are the parameters in the GDG creation? What is the difference
between SCRATCH & EMPTY? What is the use of LIMIT parameter?
Sort
How to get the Account No from File 1 , Account Holder Name & Address from File 2 in a third file…It
may also happen that there is no matching records in File 2. How to take care of this scenario?