Tag: mainframe

Questions Related to mainframe

  1. It is used for individual data item in working-storage section.

  2. It is used for items with rename clause

  3. It is used for a data item which redefines another data item.

  4. It is used for a condition name which can have either a true or false


Correct Option: D
  1. IF A NOT = 1 OR 2 OR 3 MOVE A TO B.

  2. IF NOT A = 1 AND 2 AND 3 MOVE A TO B.

  3. IF A NOT = 1 AND 2 AND 3 MOVE A TO B.

  4. IF A NOT = 1 OR A NOT = 2 OR A NOT = 3 MOVE A TO B.


Correct Option: C
  1. Redefines Clause

  2. Renames Clause

  3. Elementary Level Items

  4. Condition Names.


Correct Option: B
  1. Alpha-numeric (X), alphabetic (A) and numeric(9).

  2. Alpha-numeric (X) and numeric(9).

  3. Alpha-numeric (X), alphabetic (A), String (S) and numeric(9)

  4. None of the above


Correct Option: A

The following is Data Division entry 01 EMP-RECORD. 02 EMP-NAME. 04 FIRST-PART. 05 FIRST-NAME PIC X (10). 05 MIDDLE-NAME PIC X (10). 04 SURNAME PIC X(20). Which one of the following gives correct information about the above record description.

  1. It is correct.

  2. It is not correct because first-name and middle name contain the same PIC Clauses

  3. Not correct because the PIC Clause is missing for the first three data items.

  4. Not correct because the level number 03 is missing


Correct Option: A
  1. 01 to 77

  2. 01 to 49 and 77

  3. all odd numbers from 01 to 49

  4. 01 to 49


Correct Option: D
  1. Comp is binary usage, while comp-3 indicates packed decimal.

  2. Comp is a packed decimal, while comp-3 indicates binary usage.

  3. Comp and Comp-3 are packed decimal.

  4. Comp and Comp-3 are binary usage.


Correct Option: A
Explanation:

To understand the difference between comp and comp-3 usage, the user needs to know about the different data types in COBOL programming language.

A) Comp is binary usage, while comp-3 indicates packed decimal. This option is incorrect because comp is not binary usage. Comp is a usage for binary integers and comp-3 is a usage for packed decimal.

B) Comp is a packed decimal, while comp-3 indicates binary usage. This option is incorrect because it incorrectly states the usages of comp and comp-3. Comp is a usage for binary integers, while comp-3 is a usage for packed decimal.

C) Comp and Comp-3 are packed decimal. This option is incorrect because comp and comp-3 are not both packed decimal. Comp is a usage for binary integers, while comp-3 is a usage for packed decimal.

D) Comp and Comp-3 are binary usage. This option is incorrect because comp and comp-3 are not both binary usage. Comp is a usage for binary integers, while comp-3 is a usage for packed decimal.

The Answer is: A. Comp is binary usage, while comp-3 indicates packed decimal.