HP 3000 Manuals

INPUT-OUTPUT SECTION [ HP COBOL II/XL Quick Reference Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Quick Reference Guide

INPUT-OUTPUT SECTION 

	       Click here to view figure.
            

File Control Clauses 

	       Click here to view figure.
            

	       Click here to view figure.
            

	       Click here to view figure.
            

          Table 4-2.  ANSI COBOL'85 File Status Codes 

--------------------------------------------------------------------------------
|      |                       |                       |                       |
|      |                       |   RANDOM ACCESS or    |                       |
|      |      SEQUENTIAL       |       RELATIVE        |        INDEXED        |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| S    | 00-Successful.  No    | 00-Successful.  No    | 00-Successful.  No    |
| U    |    more information   |    more information   |    more information   |
| C    |    available.         |    available.         |    available.         |
| C    | 04-READ length of     | 04-READ length of     | 02-READ current       |
| E    |    record doesn't     |    record doesn't     |    key = next key     |
| S    |    match file.        |    match file.        |    value -WRITE or    |
| S    | 05-OPEN.  Optional    | 05-OPEN.  Optional    |    REWRITE creates    |
| F    |    file not           |    file not           |    duplicate key      |
| U    |    present,           |    present,           |    for alternate      |
| L    |    created.           |    created.           |    key in which       |
|      | 07-File is not a      |                       |    duplicates are     |
|      |    tape as the        |                       |    allowed.           |
|      |    OPEN/ CLOSE        |                       | 04-READ length of     |
|      |    phrase implies.    |                       |    record doesn't     |
|      |                       |                       |    match file.        |
|      |                       |                       | 05-OPEN.  Optional    |
|      |                       |                       |    file not           |
|      |                       |                       |    present,           |
|      |                       |                       |    created.           |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| A    | 10-EOF or optional    | 10-EOF or optional    | 10-EOF or optional    |
| T    |    file not present   |    file not present   |    file not present   |
| E    |    on READ.           |    on READ.           |    on READ.           |
| N    |                       | 14-Record number      |                       |
| D    |                       |    too big for        |                       |
|      |                       |    relative key       |                       |
|      |                       |    data item on       |                       |
|      |                       |    READ.              |                       |
|      |                       |                       |                       |
--------------------------------------------------------------------------------

          Table 4-2.  ANSI COBOL'85 File Status Codes (cont.) 

--------------------------------------------------------------------------------
|      |                       |                       |                       |
|      |                       |   RANDOM ACCESS or    |                       |
|      |      SEQUENTIAL       |       RELATIVE        |        INDEXED        |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| I    |                       | 22-WRITE a            | 21-Sequence error.    |
| N    |                       |    duplicate key.  (1)| 22-WRITE OR           |
| V    |                       | 23-Record does not    |    REWRITE            |
| A    |                       |    exist.             |    a duplicate key.   |
| L    |                       |   -START OR READ on   | 23-Record does not    |
| I    |                       |    missing optional   |    exist.             |
| D    |                       |    file.              |   -START OR READ on   |
| K    |                       | 24-WRITE beyond       |    missing optional   |
| E    |                       |    file boundary.     |    file.              |
| Y    |                       |   -Sequential         | 24-WRITE beyond       |
|      |                       |    WRITE record       |    file boundary.     |
|      |                       |    number too         |                       |
|      |                       |    big for relative   |                       |
|      |                       |    key data item.     |                       |
|      |                       |                       |                       |
--------------------------------------------------------------------------------

          Table 4-2.  ANSI COBOL'85 File Status Codes (cont.) 
--------------------------------------------------------------------------------
|      |                       |                       |                       |
|      |                       |   RANDOM ACCESS or    |                       |
|      |      SEQUENTIAL       |       RELATIVE        |        INDEXED        |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| P    | 30-No more            | 30-No more            | 30-No more            |
| E    |   information         |    information        |    information        |
| R    |   available.[REV BEG] |    available.[REV BEG]|    available.[REV BEG]|
| M    | 31-OPEN, SORT, or     | 31-OPEN, SORT, or     | 31-OPEN, SORT, or     |
| A    |    MERGE of dynamic   |    MERGE of dynamic   |    MERGE of dynamic   |
| N    |    file failed due    |    file failed due    |    file failed due    |
| E    |    to file            |    to file            |    to file name       |
| N    |    attribute          |    attribute          |    attribute          |
| T    |    conflict.[REV END] |    conflict.[REV END] |    conflict.[REV END] |
| E    | 34-Boundary           | 35-Nonoptional        | 35-Nonoptional        |
| R    |    violation.         |    file not           |    file not           |
| R    | 35-Nonoptional        |    present for        |    present for        |
| O    |    file not           |    OPEN.              |    OPEN.              |
| R    |    present for        | 37-EXTEND or          | 37-EXTEND or          |
|      |    OPEN.              |    OUTPUT on          |    OUTPUT on          |
|      | 37-EXTEND or          |    unwritable file.   |    unwritable file.   |
|      |    OUTPUT on          |   -I-O for file       |   -I-O for file       |
|      |    unwritable file.   |    that does          |    that does          |
|      |   -I-O for file       |    not support        |    not support        |
|      |    that does not      |    it.                |    it.                |
|      |    support it.        |   -INPUT on invalid   |   -INPUT on invalid   |
|      |   -INPUT on invalid   |    device for         |    device for         |
|      |    device for         |    input.             |    input.             |
|      |    input.             | 38-OPEN on file       | 38-OPEN on file       |
|      | 38-OPEN on file       |    closed with        |    closed with        |
|      |    closed with        |    LOCK.              |    LOCK.              |
|      |    LOCK.              | 39-OPEN               | 39-OPEN               |
|      | 39-OPEN               |    unsuccessful due   |    unsuccessful due   |
|      |    unsuccessful due   |    to fixed file      |    to fixed file      |
|      |    to fixed file      |    attribute          |    attribute          |
|      |    attribute          |    conflict.          |    conflict.          |
|      |    conflict.          |                       |                       |
|      |                       |                       |                       |
--------------------------------------------------------------------------------

          Table 4-2.  ANSI COBOL'85 File Status Codes (cont.) 

--------------------------------------------------------------------------------
|      |                       |                       |                       |
|      |                       |   RANDOM ACCESS or    |                       |
|      |      SEQUENTIAL       |       RELATIVE        |        INDEXED        |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| L    | 41-OPEN on file       | 41-OPEN on file       | 41-OPEN on file       |
| O    |    that is            |    that is            |   that is             |
| G    |    already open.      |    already open.      |   already open.       |
| I    | 42-CLOSE for file     | 42-CLOSE for file     | 42-CLOSE for file     |
| C    |    not open.          |    not open.          |    not open.          |
| E    | 43-No READ before     | 43-No READ before     | 43-No READ before     |
| R    |    REWRITE.           |    REWRITE/DELETE.    |    REWRITE/DELETE.    |
| R    | 44-Boundary           | 44-Boundary           | 44-Boundary           |
| O    |    violation.         |    violation.         |    violation.         |
| R    |   -Record too big     |   -Record too big     |   -Record too big     |
|      |    or too small.      |    or too small.      |    or too small.      |
|      |   -Rewrite record     | 46-READ after         | 46-READ after         |
|      |    not same size.     |    AT END or          |    AT END or          |
|      | 46-READ after         |    after              |    after              |
|      |    AT END or          |    unsuccessful       |    unsuccessful       |
|      |    after              |    READ or START.     |    READ or START.     |
|      |    unsuccessful       | 47-READ or START      | 47-READ or START      |
|      |    READ.              |    on file not        |    on file not        |
|      | 47-READ on file       |    open for           |    open for           |
|      |    not open           |    input or I-O.      |    input or I-O.      |
|      |    for input.         | 48-WRITE on file      | 48-WRITE on file      |
|      | 48-WRITE on file      |    not open for       |    not open for       |
|      |    not open for       |    output or I-O.     |    output or          |
|      |    output.            | 49-REWRITE or         |    I-O.               |
|      | 49-REWRITE on file    |    DELETE on          | 49-REWRITE/DELETE     |
|      |    not open for I-O.  |    file not open      |    on file not        |
|      |                       |    for I-O.           |    open for I-O.      |
|      |                       |                       |                       |
--------------------------------------------------------------------------------

(1) Does not apply to random files.

          Table 4-3.  ANSI COBOL'74 File Status Codes 

--------------------------------------------------------------------------------
|      |                       |                       |                       |
|      |                       |   RANDOM ACCESS or    |                       |
|      |      SEQUENTIAL       |       RELATIVE        |        INDEXED        |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| S    | 00-Successful.  No    | 00-Successful.  No    | 00-Successful.  No    |
| U    |    more information   |    more information   |    more information   |
| C    |    available.         |    available.         |    available.         |
| C    |                       |                       | 02-READ current       |
| E    |                       |                       |    key = next         |
| S    |                       |                       |    key value.         |
| S    |                       |                       |   -WRITE or REWRITE   |
| F    |                       |                       |    creates            |
| U    |                       |                       |    duplicate key      |
| L    |                       |                       |    for alternate      |
|      |                       |                       |    key in which       |
|      |                       |                       |    duplicates are     |
|      |                       |                       |    allowed.           |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| A    | 10-EOF or optional    | 10-EOF or optional    | 10-EOF or optional    |
| T    |    file not           |    file not           |    file not           |
| E    |    present.           |    present.           |    present.           |
| N    |                       |                       |                       |
| D    |                       |                       |                       |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| I    |                       | 22-WRITE              | 21-Sequence error.    |
| N    |                       |    a duplicate key.   | 22-WRITE OR           |
| V    |                       | 23-Record does not    |    REWRITE a          |
| A    |                       |    exist.             |    duplicate key.     |
| L    |                       |   -START OR READ on   | 23-Record does not    |
| I    |                       |    missing optional   |    exist              |
| D    |                       |    file.              |   -START OR READ on   |
| K    |                       | 24-WRITE beyond       |    missing optional   |
| E    |                       |    file boundary.     |    file.              |
| Y    |                       |   -Sequential         | 24-WRITE beyond       |
|      |                       |    WRITE record       |    file boundary.     |
|      |                       |    number too         |                       |
|      |                       |    big for relative   |                       |
|      |                       |    key data item.     |                       |
|      |                       |                       |                       |
--------------------------------------------------------------------------------

          Table 4-3.  ANSI COBOL'74 File Status Codes (cont.) 

--------------------------------------------------------------------------------
|      |                       |                       |                       |
|      |                       |   RANDOM ACCESS or    |                       |
|      |      SEQUENTIAL       |       RELATIVE        |        INDEXED        |
|      |                       |                       |                       |
--------------------------------------------------------------------------------
|      |                       |                       |                       |
| P    | 30-No more            | 30-No more            | 30-No more            |
| E    |    information        |    information        |    information        |
| R    |    available.         |    available.         |    available.         |
| M    | 34-Boundary           |                       |                       |
| A    |    violation.         |                       |                       |
| N    |                       |                       |                       |
| E    |                       |                       |                       |
| N    |                       |                       |                       |
| T    |                       |                       |                       |
| E    |                       |                       |                       |
| R    |                       |                       |                       |
| R    |                       |                       |                       |
| O    |                       |                       |                       |
| R    |                       |                       |                       |
|      |                       |                       |                       |
--------------------------------------------------------------------------------

I-O-CONTROL Paragraph 

	       Click here to view figure.
            



MPE/iX 5.0 Documentation