0% found this document useful (0 votes)
72 views8 pages

Ibm Mainframe Job Interview Questions and Answers

interview questions of mainframe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views8 pages

Ibm Mainframe Job Interview Questions and Answers

interview questions of mainframe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

IBM MainFrame Job Interview

Questions And Answers

Interview Questions Answers


https://interviewquestionsanswers.org/
About Interview Questions Answers

Interview Questions Answers . ORG is an interview preparation guide of thousands of Job


Interview Questions And Answers, Job Interviews are always stressful even for job seekers who have
gone on countless interviews. The best way to reduce the stress is to be prepared for your job
interview. Take the time to review the standard interview questions you will most likely be asked.
These interview questions and answers on IBM MainFrame will help you strengthen your technical
skills, prepare for the interviews and quickly revise the concepts.

If you find any question or answer is incorrect or incomplete then you can submit your question or
answer directly with out any registration or login at our website. You just need to visit IBM
MainFrame Interview Questions And Answers to add your answer click on the Submit Your Answer
links on the website; with each question to post your answer, if you want to ask any question then you
will have a link Submit Your Question; that's will add your question in IBM MainFrame category. To
ensure quality, each submission is checked by our team, before it becomes live. This IBM MainFrame
Interview preparation PDF was generated at Saturday 6th February, 2021

You can follow us on FaceBook for latest Jobs, Updates and other interviews material.
www.facebook.com/InterviewQuestionsAnswers.Org

Follow us on Twitter for latest Jobs and interview preparation guides.


https://twitter.com/InterviewQA

If you need any further assistance or have queries regarding this document or its material or any of
other inquiry, please do not hesitate to contact us.

Best Of Luck.

Interview Questions Answers.ORG Team


https://InterviewQuestionsAnswers.ORG/
[email protected]
IBM MainFrame Interview Questions And Answers
In
te

IBM MainFrame Interview Questions And Answers Guide.


rv
ie
w
Q

Question - 1:
i need the code for this program in cobol.
ue

2+1=3
4+3=7
6+5=11
8+7=15
st

10+9=19
Ans:
do a loop on below equation . Varying n from 1 to required
io

value
(2n) + (2n-1)
ns
View All Answers

Question - 2:
What is label record is standard or omitted in file description of data division?
A

Ans:
Label record is standard means it will use disk files. But
tape files can have standard label too.
ns

If the label record is omitted it should be a the tape file


without any begin and end blocks on the tape.
View All Answers
w

Question - 3:
How would find total records in files using seqientional?
er

Ans:
We can increment the count for each reading of record in a file.
s.

Read file
count = count + 1
At end
O

display count
View All Answers
R

Question - 4:
Can 88 level variable be declared in FD section?
G

Ans:
yes
View All Answers

Question - 5:
Suppose I have 1000 rows in a db2 table. I want to update first 100 records, How do I do it?
Ans:
is there identity column in this table, for example, if
there is a column indexnum int(supposed start from 1), you
can use the Update Table Set XXX=XXX where indexnum < 101
View All Answers

Question - 6:
How to handle -911 (deadlock) error in a db2 program so that the program will never abend?

Copyright © https://InterviewQuestionsAnswers.org Page 3/8


IBM MainFrame Interview Questions And Answers

Ans:
Dead lock time out erro occurs in the following case:
If two or more programs acquired exclusive lock on the
data,which may be needed for other programs without that
In

data which can not proceed further.


Solution: You can roll back current unit of work for one of
the programs after preset time interval for deadlocks and
terminate that program.
te

View All Answers


rv

Question - 7:
select distinct(empid),distinct(dept),name
from EMP
ie

will the above query work?


Ans:
w

No, It will not work. SELECT DISTINCT works only for single
cloumn.
DISTINCT can be applied multiple times only when you want
to apply aggregate functions such as COUNT, AVG & SUM.
Q

e.g.
SELECT COUNT(EMPNO)/COUNT(DISTINCT(WORKDEPT)), COUNT
(DISTINCT(JOB))
ue

FROM DSN8810.EMP
View All Answers

Question - 8:
st

We have an output dataset in job with disp parameter as SHR.


Can we write data in that file dataset?
io

Ans:
we cannot write when disp is share
ns
View All Answers

Question - 9:
How can we increment subscript and index?
A

Ans:
SUBCRIPT:
CAN BE INCREMENT OR DECREMENT USING ARITHMETIC OPERATIONS
ns

INDEX:
CAN BE INCREMENT OR DECREMENT USING SET VERB
View All Answers
w

Question - 10:
Suppose I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to retrieve a column data from B table. How will you write a
er

query?
Ans:
s.

One can use Inner Join to get data from two tables.
View All Answers
O

Question - 11:
While creating a table, by mistake you have given size of one field as 10. But as per requirement size should be 8. What is your next step?
R

Ans:
If table is empty then we alter this column to any length,
G

but if some data got inserted into the table then we can
also decrease the column length upto largest data size
available in that perticulat column.
View All Answers

Question - 12:
What are the parameter we cannot use in procedure? How many instream we can write in single jcl? Can we call instream to catalog and catalog to instream?
Ans:
sysin dd * we cannot use in procedure,15 instream proc we
can code.we can call instream to catalog.but we cannot call
catalog to instream
View All Answers

Question - 13:
WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH?

Copyright © https://InterviewQuestionsAnswers.org Page 4/8


IBM MainFrame Interview Questions And Answers

Ans:
First thing is we can see this kind of differece only in VB
files not in fixed block files.
LRECL of VB file will contain the maximum record length of
In

a file + 4 bytes RDW(Record Descriptor Word) field which


gives the length of the record as the file contains
variable record lengths.
Example : if we have EMP-FILE VB file which contains 80
te

THRU 100 CHARECTERS


So the LRECL of this file is going to be 100+4 which is 104
bytes.
rv

View All Answers

Question - 14:
ie

A job has 90 steps i want to execute only step7 and step15?


Ans:
w

In the jobcard, Give restart=step7, code cond=(0,le) from


step8 - step14, Give a null stmt(//) after step15. That's
it your requirement is met.
Q

Simplest way:
There is an utility IEBEDIT which is used to execute only
few particular steps from 'n' steps in a jcl.
ue

//JOBCARD
//STEPNAME EXEC PGM=IEBEDIT
//SYSUT1 DD DSN=MYPRGM.DSN,DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD *
st

EDIT TYPE=INCLUDE STEPNAME=(STEP7,STEP15)


/*
//
io

MYPRGM.DSN = The name of the dataset that has the actual


JCL.
View All Answers
ns

Question - 15:
A job has 150 steps i want to execute only 57th step?
Ans:
A

it's easy write restart=step57 in job parameter and write cond in 58th step like cond = (x,eq) where x is expected return code of 57th step.
View All Answers
ns

Question - 16:
Suppose oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records in both files copy all the common records into
w

oza017.myorg.xyz dataset?
Ans:
er

IN SORT, YOU CAN USE JOINKEYS AND CAN TAKE 50 COMMON


RECORDS IN B/W 2 I/P FILES AND WRITE TO O/P FILE.
View All Answers
s.

Question - 17:
O

if a pic 9(3) value 354,b pic x(2) value 46 then


a)a>b
2)a<b
R

3)error
Ans:
G

As picture clause for variable b is x(2), which means that


it can accept both numeric and characters of length 2, but
the care we should take here is that we should enclose them
in the single quotes, therefore to my expectation option b
is write.
View All Answers

Question - 18:
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling JCL?
Ans:
//PROC1 PROC
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=XYZ, DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// PEND
//JJJ JCLLIB ORDER=PROCLIB PATH
Copyright © https://InterviewQuestionsAnswers.org Page 5/8
IBM MainFrame Interview Questions And Answers

//PROC2 PROC
//STEP2 EXEC PROC1
//JOBNAME JOB PARAMETERS
//JJJ JCLLIB ORDER=PROCLIB PATH
//PROC3 PROC
In

//STEP2.DD1 DSN=NEW NAME,DISP=SHR


THIS IS D WAY....
THIS PROG. WILL DO NOTHING IT'S JUST AN EXAMPLE
te

View All Answers


rv

Question - 19:
What is difference b/w file-aid tool and file-aid utility?
Ans:
ie

File-aid tool is online tool (application) used for


processing files using online screens. File-aid utility is
used in jcl for processing files in batch.
w

View All Answers

Question - 20:
Q

Tell about How do u eliminate the duplicates?


Ans:
ue

By using DFSORT we can eliminate the duplicates


//Sysin dd *
sort fields=(1,5,ch,A)
sum fields=
st

/*
//
in the above dfsort we use sum fields= empty then it
io

eliminate the duplicates


if u want all dupli.in one file u can use
sum fields = xsum........
ns

View All Answers

Question - 21:
How To get the last record in VSAM file in cluster? And How can u get the ksds file records into ur COBOL program? Please tell me about these two questions.?
A

Ans:
Move highvalues to the key of the VSAM file and the issue Readnext record command. Then give Readprev command. This will read the last record. In VSAM, there
ns

is one command HURBA, Using that we can read the last record, If you want to know more about go to IBM RED BOOKS. You will get the solution.
by using the HURBA we can get the max records by using the CKD count key data we will get the last record
View All Answers
w

Question - 22:
How do define Dynamic array in COBOL how do u define single dimensional array and multidimensional array in your COBOL?
er

Ans:
In IBM Cobol
s.

1) In IBM's Language Environment you can dynamically


acquire storage (look up HEAP in the manual). The storage
you acquire you can use as you like. Can be an array,
therefore a dynamic array. It is a "work-around" as dynamic
O

arrays are not directly supported.


2) 01 SINGLE-DIM-ARRAY
05 SDA-ITEM PIC X OCCURS 30.
R

A single-dimension array of thirty one-byte characters.


3) 01 MULTI-DIM-ARRAY.
G

05 MDA-FIRST-DIM OCCURS 20.


07 MDA-SECOND-DIM OCCURS 30 PIC X.
A multi-dimension array of 20 times 30 one-byte characters.
View All Answers

Question - 23:
What is difference between comp and comp-3?
Ans:
Comp is binary.its the type how system stores ur data.
pic s9(1)-->pics9(4) --occupies 2bytes
pic s9(5)---pic s9(8) ----4 bytes
pic s9(9)---pics9(18)-----8 bytes
comp-3 is for packed decimal data where each character occupies half byte and sign is stored in last nibble.
View All Answers

Question - 24:

Copyright © https://InterviewQuestionsAnswers.org Page 6/8


IBM MainFrame Interview Questions And Answers

What is use of linkage section?


Ans:
Linkage section is used to accept data from outside the program.either its parm part of Jcl or Call from any other programs,they pass data into called program thru
linkage section only.
In

View All Answers


te

Question - 25:
File1 has 100 records and file2 has 200 records i want to copy 50 records which r in both file into file3?
rv

Ans:
First need to sort both files
READ FILE1
READ FILE2
ie

PERFORM UNTIL EOF = 'Y'


IF FILE1-ID > FILE2-ID THEN
READ FILE2 AT END MOVE 'Y' TO EOF
w

ELSE IF FILE1-ID < FILE2-ID


READ FILE1 AT END MOVE 'Y' TO EOF
ELSE IF FILE1-ID = FILE2-ID
WRITE FILE3
Q

READ FILE1 AT END MOVE 'Y' TO EOF


READ FILE2 AT END MOVE 'Y' TO EOF
END-PERFORM
ue

View All Answers

Question - 26:
st

How to fetch even records from one file to another file by using ICETOOL in JCL?
Ans:
io

//STEP1 EXEC PGM=SORT


//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
ns

//SORTIN DD DSN=INPUT.DATA,DISP=SHR
//OUTDATA DD DSN=OUTPUT.DATA,DISP=(NEW,CATLG,DELETE)
.
.
.
//SYSIN DD *
A

OPTION COPY
OUTFIL FNAMES=OUTDATA,SAMPLE=2
ns

THIS WILL COPY ALL EVEN RECORDS


-------------------------------------------
FOR ODD RECORDS
OUTFIL FNAMES=OUTDATA,STARTREC=1,SAMPLE=2
w

View All Answers


er
s.
O
R
G

Copyright © https://InterviewQuestionsAnswers.org Page 7/8


Mainframes Most Popular & Related Interview Guides

1 : IBM AS400 Interview Questions and Answers.

2 : IMS DB Interview Questions and Answers.

3 : JCL Interview Questions and Answers.

4 : CICS Interview Questions and Answers.

5 : IBM COBOL400 Interview Questions and Answers.

6 : MQ Series Interview Questions and Answers.

7 : IBM Assembler Interview Questions and Answers.

8 : IBM ADABAS Interview Questions and Answers.

9 : VSAM Interview Questions and Answers.

10 : IBM Natural Interview Questions and Answers.

Follow us on FaceBook
www.facebook.com/InterviewQuestionsAnswers.Org

Follow us on Twitter
https://twitter.com/InterviewQA

For any inquiry please do not hesitate to contact us.

Interview Questions Answers.ORG Team


https://InterviewQuestionsAnswers.ORG/
[email protected]

You might also like