KEMBAR78
MF Interview Qstns | PDF | Parameter (Computer Programming) | Computer Programming
0% found this document useful (0 votes)
53 views10 pages

MF Interview Qstns

The document provides an overview of various concepts related to GDG, SYNC points, data handling in COBOL, and DB2 errors. It includes detailed answers to questions about versioning in jobs, handling duplicates, cursor management, and file processing techniques. Additionally, it covers topics such as SQL joins, referential integrity, and the compilation process for COBOL with DB2.

Uploaded by

afzalsk.sap
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)
53 views10 pages

MF Interview Qstns

The document provides an overview of various concepts related to GDG, SYNC points, data handling in COBOL, and DB2 errors. It includes detailed answers to questions about versioning in jobs, handling duplicates, cursor management, and file processing techniques. Additionally, it covers topics such as SQL joins, referential integrity, and the compilation process for COBOL with DB2.

Uploaded by

afzalsk.sap
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/ 10

1) What is GDG?

collection of related data sets, or generations, that are arranged in chronological order..these
datasets can be referenced by relative generation and version number.

If i have a job
-> First step will create a new version v0001 with +1
-> Second step will use the latest version(+1 of previous step) as input and will generate the
another file.
Questions:
i) What will be the version number we should use for the second step file in the bracket
in DSN.
Ans: We should use +2 because as the job is not yet completed the version will not be
updated.
Eg: For 2nd step DSN shd be like DSN=PAYROLL.SALARY.MONTHLY(+2)
ii) If the job is failed due to error in second step, and if we are restarting the job from
second step after fixing error, what will be the DSN name version for input
file and second step file?
Ans: As job is failed at second step the first must have created the latest generation.
So in input version shd be DSN=PAYROLL.SALARY.MONTHLY(0)
Second step file DSN= DSN=PAYROLL.SALARY.MONTHLY(+1)
2) What is SYNC point, Have you ever used it?

SYNC clause is used to optimize processing speed but it does so at the expense of storage(as
it introduces slack bytes)
And: MainframBug web
3) If my input file is having duplicated how can i remove them and how to copy duplicates to
new file?
Ans: It can be done by Using the SORT.
Sort fields= copy
sum fields = none,xsum

4)what difference between Search and Search all, Static and Dynamic call, Subscript and index
etc.
5) Scrollable cursors
6) Db2 errors and solving
7) SOC7 and solving
8) What RESTART and How to restart from particular step?
9)What is Redefine, Renames, 77 level, 88 level

● REDEFINES clause is used to describe the same storage area for more than one data
name

● 66 It is used to regroup the elementary data items of same or different groups and
assign them a new name. This way a new group can be formed keeping the original
groups intact.

● 88 Sometimes we have to perform check in programs like whether gender is male or


female, need to decide and check grade based on range of score, in such situation we
can declare the condition name data items

10) Evaluate, perform statements what are they and how to use them.
11)What is Occurs clause?
12) Cursor with hold what is it?
13) What is Commit?
14) What is cursor stability, RR, UR, Read stability.
15) What is VIEW and why we use View. If i dont have authorisation for particular table can i
create a view?
Ans: View is selected from different tables. Yes view can be created when we dont have
authorisation.
16)All Precompilation steps, Each and Every step is important. We can see explaination in
"mainframetechhelp" OR "KumarIT channel"
17)Can we alter the foreign key and what is referential integrity.
18)All joins like inner join, outer join, union, union all etc
19)Where we declare the cursor.
20) Why we use the cursor.
21) How to select the max salary from table, 2nd highest salary.
22) Selecting empid, empname, empsal from table where no of people in the dept is >3
Ans: WE can use groupby
23)How do u define keys for KSDS file.
Ans: KEys(length of key, Starting position).
24)Which is mandatory division in COBOL,
25) COMP values and y we use.
Ans: Mainframebug website explained beautifully.

https://www.mainframebug.com/tuts/COBOL/module5/Top8_Data_Representation_Mainframe_
BCD_Binary.php

26)If i have string in a file, RECORD LENGHT is 80 and i have 100 records. I dont know where
the string resides in the record. But i want to write all the records which contains the string.
Eg: Hari will be there at random positions in 50 records of a file which contains total 100
records. If i want all records which are having Hari in o/p, how can i do that.
Ans: We can use substirngsearch Using SORT in jcl.
INCLUDE COND = (1,80,SS,EQ,C'Hari')
https://www.mainframestechhelp.com/utilities/sort/include-substring-search.htm

27)SO many questions on application of INCLUDE COND, OUTREC overlay, fields, builds,
findrep, ifthen.
Ans: MainframeBug website we can refer.

Watch Mainframe Guru, IT job matters, Venkat since 2010, Anil Polsani etc
28) If i want to have only records having HARI at pos 4-7 in o/p file then how can i do that?
Ans: Pgm= SORT
Sortfields = copy.
Include cond= (4,4,EQ,C'HARI')
29) How can i add a trailer to a file?
30) JOINS of tables.
31) Referential Intergrity.
32) If i need to skip a particular step, how can i do tha?
Ans: Using COND operaor
33) if i dont want to execute a particular step, how can do it?
Ans: COND=(00,LE)
34) Difference between COND=(RC,RO) And COND=(RC,RO,STEP-RETURNCODE)
Ans: First will check all the previous steps return codes but second one checks only the
particular s step return code.
35)I have a file, it has 5 records And records are as follows
1A
2B
3A
4B
5A
If i want to write only 1A,3A,5A how can i do that?
Ans: PGM = SORT
SORTFIELDS = COPY
INCLUDE COND = (2,1,EQ,C'A')
36) If i want to replace the Hari string in input file with "Keshava" how can i do that.
Ans: Using Findrep
https://www.mainframebug.com/tuts/JCL/module8/Top11OUTREC_FINDREP.php
37) Difference between simple, segmented and partitioned table space.
38) Can i use redefine for variable which are having different lenghts.
Ans:
https://www.mainframebug.com/tuts/COBOL/module5/Top14_REDEFINES_clause.php
39) Difference between INDEX AND SUBSCRIPT
SEARCH AND SEARCH ALL
Etc
40) COBOL pgm for prime number and even number.
41) FIle handling and scenario based questions.
Ans: Through with concepts like opening, reading file sequentially using loops etc. See
Anil polsani Video on youtube.
42)Symbolic parameter and symbolic parameter for PROCs.
Ans: See ANil polsani video on youtube
43) Overriding in jcl especially PROCS. Nested procs overriding important. Because if we want
to override
nesed PROCs we can do only one step overriding.
44) Temporary dataset and abour "&" Symbol for temp DS.
45) How many ways we can accept the data into a cobol pgm.
Ans: using sysin(Accept), files and parameter passing.
46)Call by value, cotent and reference.
47)Db2 datatypes and equivalent Cobol variable declation.
Ans: See mainframetechhelp website
48)COmpilation process for cobol+ db2. VERY IMPORTANT.
https://www.mainframestechhelp.com/tutorials/db2/precompilation-process.htm
49)Cursor very important.
50) Where we declare the cursor in cobol pgm.
Ans: in Working storage not mandatory but good practice.
51) Stages in cursor handling like declare, open, fetch and close.
52) If i want only records which are duplicate i.e. present more than 2 times, how can i do that.
Ans: Using ICETOOL
53)-305 DB2 error.
Ans: See anil polsani video.
54)-805 and -811 db2 error.
55) How many nested procs are possible?
Ans: 15
56) DIfference between empty and no empty, scratch and no scratch in GDG creation.

Most important topics links:

https://www.mainframebug.com/tuts/JCL/module8/Top1SortMergeIntro.php

57) what is SS range in compiler options?

https://www.techagilist.com/mainframe/cobol/ssrange-vs-nossrange-compiler-option/
58)How to know whether a file is empty and and i want to process the file inl if it has records,
how can I do that?

59) I have 100 records in a file. i want a output file in such a way that 100records will come first
and so on and the first record at last. How can i do that?
60) i created a file and job successful and if i submit the job again to create the file with the
same name what will happen?

You might also like