Tag: mainframe

Questions Related to mainframe

what are the access mode requirements of Start statement?

  1. Sequential

  2. Dynamic

  3. Relative

  4. Index

  5. All the above


Correct Option: B

Which Clause can be used instead of checking for File Status =10?

  1. Record Not Found

  2. At End

  3. Duplicate Record

  4. End Of File

  5. At Spaces


Correct Option: B
Explanation:

To answer this question, the user needs to have knowledge of COBOL file processing clauses.

Option A: Record Not Found - This clause is used to detect if there are no more records beyond the point where a READ statement is executed. It is not an alternative to checking for file status = 10.

Option B: At End - This clause is used to detect the end of a file. It is a valid alternative to checking for file status = 10.

Option C: Duplicate Record - This clause is used to detect if there are duplicate records in a file. It is not an alternative to checking for file status = 10.

Option D: End Of File - This clause is used to detect the end of a file. It is a valid alternative to checking for file status = 10.

Option E: At Spaces - This clause is used to detect if a record contains only spaces. It is not an alternative to checking for file status = 10.

Therefore, the correct answer is:

The Answer is: B. At End

Which mode of opening is required when Re-Write is used?

  1. Update

  2. Open

  3. I-O

  4. Input

  5. Rewrite


Correct Option: C

How do you define a table/Array in COBOL using Index?

  1. 01 ARRAYS. 05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  2. 01 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  3. 01 ARRAYS. 05 ARRAY1 PIC X(9) OCCURS INDEXE BY 10 TIMES

  4. 01 ARRAYS. 88 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX


Correct Option: B

Name the divisions which is not in COBOL Program?

  1. Identification

  2. Environment

  3. Data

  4. Working


Correct Option: D

AI Explanation

To answer this question, you need to understand the different divisions in a COBOL program.

In COBOL, a program is divided into four divisions:

A. Identification division: This division contains information about the program such as its name, author, and date of creation.

B. Environment division: This division contains information about the environment in which the program will run, such as the type of computer system, file descriptions, and input/output specifications.

C. Data division: This division contains declarations of data items used in the program, including variables, records, and data structures.

D. Working division: The "Working" division is not a standard division in COBOL. It is not a recognized division in COBOL programs.

Therefore, the correct answer is D. "Working" division. This division is not present in COBOL programs.

What kind of search is used in SEARCH ALL?

  1. Serial Search

  2. Binary search

  3. Tree Search

  4. SQL Search


Correct Option: B

OCCURS clause can be used except which level of variable

  1. 77

  2. 01

  3. 88

  4. 05


Correct Option: B

Instream data can be coded in PROC.

  1. True

  2. False


Correct Option: B
  1. Clause

  2. Size

  3. Usage

  4. All the above


Correct Option: D