Ibm Mainframe Placement Papers - Ibm Mainframe Interview Questions and Answers updated on 27.Jul.2024

Q1. How Do We Describe Cataloged Procedure And An Instream Procedure?

Cataloged procedures are invoked through a specification of the name of the procedure over the Exec statement and cataloged on the library of the procedure. For verifying a procedure prior to becoming a catalog procedure we will use an in-stream procedure. Instream procedures are similar to catalog procedures but there is a small difference at their execution:for executing them there are required to be placed between the Job statement and the Exec statement and they must be finished with a Pend statement.

Q2. How Many Sections Are There In Data Division?

6

Q3. Suppose I Have 1000 Rows In A Db2 Table. I Want To Update First 100 Records, How Do I Do It?

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

Q4. What Is The Meaning Of Ssrange And Nossrange?

These two are options of the compiler for verifying the out of range state for the subscript. The default will be NOSSRANGE and it implies no flagging of run-time errors when the subscript or index is exceeding the permitted range.

Q5. Indicate Which One Of The Following Is Not True About The Set Verb?

The verb can be used to increment one or more identifiers by a positive integral value.

Q6. What Is The Right Time For Using In-line Perform?

The right time is when the perform body is not used. If it is a type of code that has general me, being utilized in several locations in the program, the code should be met in a different para and not use in-line perform, but perform paraname instead.

Q7. Which Of The Following Is True About The File Which Is Referenced In A Delete Statement?

Opened I/O mode

Q8. In An Evaluate Statement, Can I Give A Complex Condition On A When Clause?

Yes

Q9. What Is The Meaning, The Advantages And Which Are The Types Of Evaluate Statement?

Evaluate statement is a different way for the neste IF statements and it works by choosing from a processing actions list. To replace IF we can use When to find out if an action will be taken. Like IF , When control goes from evaluate to the following statement on the application. The types of evaluate statement are trues and variable-name.

Q10. How Can We Describe Comp Sync?

COMP SYNC aligns an item to the natural boundaries, it will be synchronized right and left. If we use binary items that are found at the boundaries of words in memory, these ones have a more rapid address resolution. The size of word from mainframe memory is four bytes. So every word has to begin from an address which is divisible by four. When the primary variable is x(3) and the next one is s9(4) comp if the Sync clause is not specified, the second variable will begin from byte @When Sync is specified the beginning address will be 4; this more rapid, even if we may notice a little waste of memory.

Q11. What Is The Meaning Of A (new, Catlg, Keep) Disposition Mean?

The meaning is that we have a fresh datasheet and it has to be allocated, the datasheet must be CTLG if all went right but to KEEP and not CTLG the datasheet when all is abended.

Q12. What Sorting Order Does Search All Have?

The sorting order of SEARCH ALL will be Descending or Ascending, the initial value is Ascending. When we want to switch to Descending we have to provide the Descending Key clause in the time we define the array which will be sorted; the table has to be loaded in the order stated.

Q13. How Do We Describe Static Call And Dynamic Call?

The difference between Static and Dynamic Call is that the first has the invoking program name hard coded into the call statement while the second has it in storage in an identifier. Also in the case of Static the invoking program is link edited with the invoked subroutine and in the case of Dynamic Callwe will have a different module for each: the main program and the subroutine. IF we don’t use Initial or make a Cancel when we invoke the statically called subroutine then it will not be found in the default state; dynamically called routine will be forever in the default state.

Q14. What Is The Meaning Of Notcat 2?

NOTCAT 2 is a MVS message that shows if two or more entries of the same catalog exist. If an entry is already there the catalog would send us an error message. The issue can be repaired by uncataloging or deleting the primary data set and we must find that volume which contains the new data set and we must catalog it.

Q15. Can You Rewrite A Record In An Esds File? Can You Delete A Record From It?

Can rewrite (record length must be same), but not delete.

Q16. While Creating A Table, By Mistake You Have Given Size Of One Field As

If table is empty then we alter this column to any length, but if some data get inserted into the table then we can also decrease the column length up to largest data size available in that particular column.

Q17. How Can We Repair A Soc-7 Error?

The main thing to do is repairing the problematic data, usually the cause for problems with SOC-7 is a numeric item that is un-initialized, this is the primary concern. Some of the setups give us dumps for run-time abends, this can also be made by invoking OS services or subroutines via the assembly language. The dumps are useful as thei give us the ultimate instruction’s offset where the abend occurred. The output XREF listing of the compilation must be verifiedfor obtaining the line number and the verb of this offset’s source code. After that the bug can be found in the source code. For capturing the runtime dumps, we should define datasets like for instance Sysabout in JCL. When these methods are not working we must find the error source with judgement and Display. If the setup has debugging utilities, we should make use of them.

Q18. What Is Difference B/w File-aid Tool And File-aid Utility?

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.

Q19. What Is Use Of Linkage Section?

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

Q20. What Difference Exists Between Control Area And Control Interval?

A Control Area is a set of Control Intervals and it works during allocation. The size of the Control Area depends on the type of allocation (cyl, tracks, records) and ots maximum reaches 1 cylinder. The Control Interval is something like a block for QSAM files, its size is ranged between 512 bytes and 32 kilobytes, normally 2 or 4 kilobytes. If the Control Interval is bigger the performance will also increase when it comes to sequential processing.

Q21. How To Handle -911 (deadlock) Error In A Db2 Program So That The Program Will Never Abend?

Dead lock timeout error 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 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.

Q22. 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 Query?

One can use Inner Join to get data from two tables

Q23. Which Is More Efficient, Level 77 Or 01?

01

Q24. Can The Occurs Clause Be At The 01 Level?

No

Q25. How Is Sign Stored In A Comp Field ?

In the most significant bit. Bit is ON if -ve, OFF if +ve

Q26. 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?

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

Q27. What Optimum Values Can We Find For Freespace, Ci Etc?

The size of CI has to depend on the length of the record and the processing type. The normal value is 4 kilobytes but when the length of the record is bigger than 1 kilobyte we have to pick 6 kilobytes or 8 kilobytes. The normal values for FREESPACE are (20 20), when many insertions are made it should be bigger.

Q28. We Have An Output Dataset In Job With Disp Parameter As Shr. Can We Write Data In That File Dataset?

we cannot write when disp is share.

Q29. 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 Oza017.myorg.xyz Dataset?

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.

Q30. How Can We Increment Subscript And Index?

SUBSCRIPT:
CAN BE INCREMENT OR DECREMENT USING ARITHMETIC OPERATIONS
INDEX:
CAN BE INCREMENT OR DECREMENT USING SET VERB

Q31. How Are Start And Xctl Different?

Start is used for the beginning of new tractions and then the XCTL takes the operations further , trferring the control to a different application but with an equal traction ID.

Q32. What Is Label Record Is Standard Or Omitted In File Description Of Data Division?

Label record is standard me it will use disk files. But tape files can have standard label too. If the label record is omitted it should be a the tape file without any begin and end blocks on the tape.

Q33. How Could You Write A Program In A Structured Format?

No go to's

Q34. Accept Ws-date From Date Will Return The Current Date?

IN YYYYMMDD FORMAT

Q35. Can We Describe The Results Of Opening For Input Empty Vsam Files In A Cobol Program?

If the VSAM file didn’t have a record before it will be seen as unavailable and if we try to open it the operation will not succeed. Empty files can just be opened for output, case in which a dummy record will be written by COBOL and the file will be erased.

Q36. How Can We Define A Gdg?

GDG me GenerationDataGroup, for defining it we will write the command DEFINE GENERATION DATA GROUP. In the IDCAMS step, a different data set has to be defined and its DCB parameters will be used at the time when new generations are made. This is what we call a model dataset, whose ds name has to be similar to the one of the GDG.

Q37. How Would Find Total Records In Files Using Sequential?

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

Read file
count = count + 1
At end
display count

Q38. How To Get The Last Record In Vsam File In Cluster? And How Can U Get The Ksds File Records Into Ur Cobol Program?

Move high values 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 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

Q39. Execution Of A Subordinate Module Is Caused By The Use Of The Cobol Verbs ------------in The Superior Module

Perform

Q40. A Word In The Computer Memory Is Identified By_________

word length

Q41. What Is The Other Verb For Release And Write ?

Rewrite and Read

Q42. What Is The Role Of The Is Numeric Clause?

IS NUMERIC will be available for alphanumeric, packed decimal, unsigned numeric and signed numeric items. When an item is made of 0 to 9 the value returned by IS NUMERIC is True, if the item is signed then it can have 0 to 9 but also + and -.