COBOL Technical Interview Questions and Answers

Aired Consulting 12/30/2009 1 Comment

IBM COBOL Technical Interview Questions and Answers.

What is ACB and PSB in COBOL?
Answer : PSB is nothing but Program specification block. It basically inform about how a specific program is to be accessed one or more IMS DB. ACB consists of  Program Communication Block, i.e information to which segment in DB can be accessed, what the program is allowed to do with those segment and how the DB is to be accessed within.

ACB is Access Control Blocks that are generated by IMS as an expansion of information contained in the PSB in order to speed up the access to the applicable DBD's.

Explain what is a Linear Data Set in COBOL and what is its usage?

Answer : Linear Data Set is a VSAM dataset in name only. It has unstructured 4k (4096 bytes) fixed size CIs which do not contain control fields and therefore from VSAM's standpoint they do not contain any logical records. 

There is no free space, and hence no access from COBOL. It can therefore be accessed by DB2 and IMS fast path datasets. LDS hence is essentially a table of data maintained on disk. The 'table entries' must be created via a user program and can only be logically accessed via a user program. When passed, the entire LDS must be mapped into storage, then data is accessed via base and displacement type processing.

Explain what is the purpose of POINTER Phrase in STRING command?
Answer : The main purpose of a POINTER phrase is to specify the leftmost position within receiving field where the first transferred character will be stored.

Explain what is the significance of GLOBAL clause in accordance with the new standards of COBOL?

Answer : According to the new standards, when any data name, file-name, Record-name, condition name or Index defined in an Including Program can be referenced by a directly or indirectly in an included program, Provided the said name has been declared to be a global name by GLOBAL Format of Global Clause is 01 data-1 PIC 9(5) IS GLOBAL.

Explain how do we get current date from system with century?

Answer : Current date can be found by using Intrinsic function, FUNCTION CURRENT-DATE.

How many Sections are there in a Data Division in COBOL?

Answer : There are six sections. They are cited below.
1.'FILE SECTION'
2.'WORKING-STORAGE SECTION'
3.'LOCAL-STORAGE SECTION'
4.'SCREEN SECTION' 

5.'REPORT SECTION' 
6.'LINKAGE SECTION'

However, in COBOL II, there are only 4 sections as cited below.

1.'FILE SECTION' 
2.'WORKING-STORAGE SECTION' 
3.'LOCAL-STORAGE SECTION' 
4.'LINKAGE SECTION'.

Explain in detail what is the difference between a STATIC and 
DYNAMIC call in COBOL?
Answer : In COBOL, dynamically called modules are those that are not bound with the calling program at link edit time (IEWL for IBM) and so are loaded from the program library (joblib or steplib) associated with the job. For DYNAMIC calling of a module the DYNAM compiler option must be chosen, else the linkage editor will not generate an executable as it will expect null address resolution of all called modules. 

A Statically called module in COBOL is one that is bound with the calling module at link edit, and hence becomes part of the executable load module.

Explain how can you determine if a module is being called STATICALLY or 
DYNAMICALLY ?
Answer : We can determine it by only one way. We have to look at the output of the linkage editor (IEWL) or the load module itself. If the module is being called DYNAMICALLY then it will not exist in the main module, if it is being called STATICALLY then it will be existing in the load module. 

Calling a working storage variable, containing a program name, does not make a DYNAMIC call. This type of calling is known as IMPLICIT calling as the name of the module is implied by the contents of the working storage variable.
Related Posts

1 comment:

  1. Thank you so much for the Cobol Interview Questions.

    ReplyDelete

 

Aired | Copyright © 2009-2014| All Rights Reserved 2014 | Privacy Policy and Disclaimer

Contact Us | About Us