Mainframe Interview QA
Mainframe Interview QA
1) What is the authorization process and explain what are all the party’s involved in it?
2) What is dispute?
3) What is chargeback and explain with the scenario
4) What is transaction reversal and explain
5) what is offline password and online password
6) What type of information gets stored back side of the magnetic black stripe?
7) What do you mean by Code 10 process
8) Suppose your card gets swiped without your presence, how the issuer bank knows that you are
cardholder of that particular card?
9) What are all the party’s involved in the Issuer part
10) Suppose you are going abroad and swiping your India HDFC card, then which party plays crucial
role to identify your card?
11) In which scenario your card will go into collection department?
12) What is acquirer and when It will come into picture?
Mainframe:
COBOL:
6) Redefines
8) Inspect clause
17) I am accessing one PDS member in edit mode but it says ‘used by other’ kind of message ,
how can I know the locked user
1st scenario: I have two files not in sorted order and two files are not having match values but
The output file needs to be sorted order with the two files of data
2nd scenario: I have two files not in sorted order includes matching values and output file
needs to be only with the matching values
100
2) Then how you will find that, Error is for end of record or record not found?
If we are using select statement, SQL error code 100 represents record not found
If we are using cursor, in that situation, SQL error code 100 represents end of records
Employee
Employee ID Salary
3 200
4 800
7 450
SELECT *
FROM Employee Emp1
WHERE (N-1) = SELECT COUNT(DISTINCT(Emp2.Salary))
FROM Employee Emp2
WHERE Emp2.Salary > Emp1.Salary)
Suppose if you want to fetch the 2nd highest salary from the table
SELECT *
FROM Employee Emp1
WHERE (N-1) = SELECT COUNT(DISTINCT(Emp2.Salary))
FROM Employee Emp2
WHERE Emp2.Salary > 200)
The salary in the first row of the Employee table is 200. Because the sub query is correlated to the
outer query through the alias Emp1, it means that when the first row is processed, the query will
essentially look like this – note that all we did is replace Emp1.Salary with the value of 200:
So, what exactly is happening when that first row is processed? Well, if you pay special attention to
the subquery you will notice that it’s basically searching for the count of salary entries in the
Employee table that are greater than 200. Basically, the subquery is trying to find how many salary
entries are greater than 200. Then, that count of salary entries is checked to see if it equals 1 in the
outer query, and if so then everything from that particular row in Emp1 will be returned.
Note that Emp1 and Emp2 are both aliases for the same table – Employee. Emp2 is only being used in
the subquery to compare all the salary values to the current salary value chosen in Emp1. This allows
us to find the number of salary entries (the count) that are greater than 200. And if this number is
equal to N-1 (which is 1 in our case) then we know that we have a winner – and that we have found
our answer.
But, it’s clear that the subquery will return a 2 when Emp1.Salary is 200, because there are clearly 2
salaries greater than 200 in the Employee table. And since 2 is not equal to 1, the salary of 200 will
clearly not be returned.
So, what happens next? Well, the SQL processor will move on to the next row which is 800, and the
resulting query looks like this:
SELECT *
FROM Employee Emp1
WHERE (1) = (SELECT COUNT(DISTINCT(Emp2.Salary))
FROM Employee Emp2
WHERE Emp2.Salary > 800)
Since there are no salaries greater than 800, the query will move on to the last row and will of course
find the answer as 450. This is because 800 is greater than 450, and the count will be 1. More precisely,
the entire row with the desired salary would be returned, and this is what it would look like:
EmployeeID Salary
7 450
It’s also worth pointing out that the reason DISTINCT is used in the query above is because there
may be duplicate salary values in the table. In that scenario, we only want to count repeated salaries
just once, which is exactly why we use the DISTINCT operator.
http://www.caliberdt.com/tips/sqlcode.htm
9) Restart process
11) Cursor remains to be open after closing the cursor also, what is the process for it
20) What are all the utilities are available with the DB2 part
23) I want to retrieve the employee names who are all joined in month of January and who are all
left the company in February and who are all having attendance as ‘P’ in the month of March
28) Whenever the program gets changed, do we need to bind the plan also ?
4) What are all the keyword parameters that we can code in the job level and step level
6) Suppose I have coded Loadlibs in the steplib and joblib, which loadlibs have priority
9) What is mod parameter and what it will do while using it in DCB parameter
15) What is the max time we can code for time parameter
18) In the Proc, Parm parameter coded but I want to override that parameter also how I can
achieve?
19) Is it possible to concatenate datasets with one DD name, if yes how we can code and do we
need to follow any precautions for that?
21) I want to execute 10 jobs at a time in a single job, how we can do that
22) I want to execute the particular steps with the utility, how we can do that?
23) Comparing two files with File-Aid and utilities
25) IF statement
VSAM
CICS
Example:
Input:
CODE: ____ FGHY DSSR FGHY ____ ZSDE ABCD ____ CVFR ZSDE
Output: