1.

How can we reference or make COBOL program realise that about the following file formats?

Answer»

1. Fixed Block File
2. Fixed Unblock File
3. Variable Block File
4. Variable Unblock File
5. Printer File

Following are the explanation to the POINTS one by one:

  1. Fixed Block File: We can identify that a file is a fixed block file if the following 3 conditions are met:
    • ORGANIZATION IS SEQUENTIAL
    • RECORDING MODE IS F
    • BLOCK CONTAINS 0
  2. Fixed Unblock File: We can identify that a file is a fixed unblock file if the following 2 conditions are met:
    • ORGANIZATION IS SEQUENTIAL
    • RECORDING MODE IS F
  3. Variable Block File: We can identify that a file is a variable block file if the following 4 conditions are met:
    • ORGANIZATION IS SEQUENTIAL
    • RECORDING MODE IS V
    • BLOCK CONTAINS 0
    • Record length is never CODED as 4 bytes in FD as JCL will consider the record length as the max length of record plus 4.
  4. Variable Unblock File: We can identify that a file is a variable unblock file if the following 3 conditions are met:
    • ORGANIZATION IS SEQUENTIAL
    • RECORDING MODE IS V
    • Record length is never coded as 4 bytes in FD as JCL will consider the record length as the max length of record plus 4.
  5. Printer File: We can reference that a file is a printer file if the following 3 conditions are met:
    • ORGANIZATION IS SEQUENTIAL
    • RECORDING MODE IS F
    • BLOCK CONTAIN 0


Discussion

No Comment Found