KyaPoocha.com

Huge Collection of Interview Questions


‘Cobol Interview Questions’ - KyaPoocha.com

What do you do to resolve SOC-7 error ? 

Basically you need to correcting the offending data. Many times the reason for SOC7 is an un-initialized numeric item. Examine that possibility first. Many installations... Read more »

Can I redefine an X(100) field with a field of X(200) ? 

Yes. Redefines just causes both fields to start at the same location. For example: 01 WS-TOP PIC X(1) 01 WS-TOP-RED REDEFINES WS-TOP PIC X(2). If you MOVE ‘12′... Read more »

What does EXIT do ? 

Does nothing ! If used, must be the only sentence within a paragraph.  Read more »

What is the difference between CONTINUE & NEXT SENTENCE ? 

They appear to be similar, that is, the control goes to the next sentence in the paragraph. But, Next Sentence would take the control to the sentence after it finds... Read more »

When would you use in-line perform ? 

When the body of the perform will not be used in other paragraphs. If the body of the perform is a generic type of code (used from various other places in the program),... Read more »

What is the difference between performing a SECTION and a PARAGRAPH ? 

Performing a SECTION will cause all the paragraphs that are part of the section, to be performed. Performing a PARAGRAPH will cause only that paragraph to be performed.  Read more »

How do you define a sort file in JCL that runs the COBOL program ? 

Use the SORTWK01, SORTWK02,….. dd names in the step. Number of sort datasets depends on the volume of data being sorted, but a minimum of 3 is required.  Read more »

How do you sort in a COBOL program Give sort file definition, sort statement syntax and meaning. ? 

Syntax: SORT file-1 ON ASCENDING/DESCENDING KEY key…. USING file-2 GIVING file-3. USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2 GIVING... Read more »

My program has an array defined to have 10 items. Due to a bug, I find that even if the program access the 11th item in this array, the program does not abend. What is wrong with it ? 

Must use compiler option SSRANGE if you want array bounds checking. Default is NOSSRANGE.  Read more »

What is binary search ? 

Search on a sorted array. Compare the item to be searched with the item at the center. If it matches, fine else repeat the process with the left half or the right... Read more »

What should be the sorting order for SEARCH ALL ? 

It can be either ASCENDING or DESCENDING. ASCENDING is default. If you want the search to be done on an array sorted in descending order, then while defining the... Read more »

What is the difference between SEARCH and SEARCH ALL ? 

SEARCH - is a serial search. SEARCH ALL - is a binary search & the table must be sorted ( ASCENDING/DESCENDING KEY clause to be used & data loaded in this... Read more »

What is the difference between index and subscript ? 

Subscript refers to the array occurrence while index is the displacement (in no of bytes) from the beginning of the array. An index can only be modified using PERFORM,... Read more »

How do you define a table/array in COBOL ? 

ARRAYS. 05 ARRAY1 PIC X(9) OCCURS 10 TIMES. 05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX.  Read more »

What does the IS NUMERIC clause establish ? 

IS NUMERIC can be used on alphanumeric items, signed numeric & packed decimal items and unsigned numeric & packed decimal items. IS NUMERIC returns TRUE... Read more »

Page 5 of 12« First...«34567»...Last »