Posted Under COBOL-Interview
PSB : Program specification block. Inform about how a specific program is to be access one or more IMS DB.
It consists of PCB(Prg Communication Block). 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.
ACB : Access Control Blocks 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.
What's a LDS(Linear Data Set) and what's it used for ?
Ans: LDS 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 freespace, and no access from Cobol. Can be accessed by DB2 and IMS fast path datasets. LDS 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.
What is the Importance of GLOBAL clause According to new standards of COBOL
Ans: 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 is01 data-1 PIC 9(5) IS GLOBAL.
What is the Purpose of POINTER Phrase in STRING command
Ans: The Purpose of POINTER phrase is to specify the leftmost position within receiving field where the first transferred character will be stored
How do we get currentdate from system with century?
Ans: By using Intrinsic function, FUNCTION CURRENT-DATE
How many Sections are there in Data Division?.
Ans: SIX SECTIONS
4.'SCREEN SECTION' 5.'REPORT SECTION' 6.'LINKAGE SECTION'
In COBOL II, there are only 4 sections. 1.'FILE SECTION' 2.'WORKING-STORAGE SECTION' 3.'LOCAL-STORAGE SECTION' 4.'LINKAGE SECTION'.
What is the difference between a DYNAMIC and STATIC call in COBOL.?
Ans: To correct an earlier answer:All called modules cannot run standalone if they require program variables passed to them via the LINKAGE section. 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 is one that is bound with the calling module at link edit, and therefore becomes part of the executable load module.
How can I tell if a module is being called DYNAMICALLY or STATICALLY?
Ans: The ONLY way is 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 seen 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 IMPLICITE calling as the name of the module is implied by the contents of the working storage variable. Calling a program name literal (CALL).
Check all articles under COBOL-Interview