COBOL Preprocessor
Invocation
Syntax Checking Mode.
:RUN PSQLCBL.PUB.SYS;INFO="(SYNTAX)"
Full Preprocessing Mode.
[ {MODULE(ModuleName)} ]
[ {OWNER(OwnerName) } ]
:RUN PSQLCBL.PUB.SYS;INFO="DBEName [({{DROP {PRESERVE}} }|...|)]"
[ {{ {REVOKE }} } ]
[ {{ } } ]
[ {{NODROP } } ]
Preprocessor Input and Output
----------------------------------------------------------------------------------------------
| | | |
| File Type | User Supplied FileName | Default Filename |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Input to the COBOL | Use file equation | SQLIN |
| Preprocessor | | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| ALLBASE/SQL Message | | SQLCT000.PUB.SYS |
| Catalog | | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Preprocessor Message File | Use file equation | SQLMSG |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Modified COBOL Source | Use file equation | SQLOUT |
| Code File | | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Constant Declaration File | Use file equation | SQLCONST |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Variable Declaration File | Use file equation | SQLVAR |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Installable Module File | Use file equation | SQLMOD |
| | | |
----------------------------------------------------------------------------------------------
Files are created in the current group and account.
COBOL Declarations for ALLBASE/SQL Data Types
-----------------------------------------------------------------------------------------------
| | | |
| ALLBASE/SQL Data | Description | COBOL Declaration |
| Type | | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| BINARY(1) | single binary byte | PIC X(1) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| BINARY(n) | fixed length binary | PIC X(n) |
| | string | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| VARBINARY(n) | variable length binary | PIC S9(9) |
| | string | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| LONG BINARY | descriptor string for | PIC X(96) |
| | long column data | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| LONG VARBINARY | descriptor string for | PIC X(96) |
| | long column data | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| CHAR(1) | single byte | PIC X(1) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| CHAR(n) | fixed length character | PIC X(n) |
| | string | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| VARCHAR(n) | variable length character | PIC X(n) |
| | string | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| DECIMAL | up to 15 digits plus sign | PIC S9(p-s) [V9(s)] COMP-3 |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| REAL | floating point | PIC S9(p) V9(p) COMP-3 |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| FLOAT | double precision floating | Not Supported |
| | point | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| INTEGER | binary integer--31 bits | PIC S9(9) COMP |
| | plus sign | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| SMALLINT | binary integer--15 bits | PIC S9(4) COMP |
| | plus sign | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| DATE | 10-character date | PIC X(10) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| TIME | 8-character time | PIC X(8) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| DATETIME | 23-character timestamp | PIC X(23) |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| INTERVAL | 20-character interval | PIC X(20) |
| | | |
-----------------------------------------------------------------------------------------------
Compatibility of ALLBASE/SQL and COBOL Data Types
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| | PIC X(n) | PIC X(n) | PIC S9(4) | PIC S9(9) | PIC S9(p-s) | PIC S9(p) |
| | | 49-level | COMP | COMP | V9(s) | V9(p) |
| | | | | | COMP-3 | COMP-3 |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| BINARY(n) | C | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| VARBINARY(n) | C | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| CHAR(1) | E | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| CHAR(n) | C | E | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| VARCHAR(n) | C | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| DECIMAL | I | I | C | C | C | C |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| REAL | I | I | C | C | C | E |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| FLOAT | I | I | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| INTEGER | I | I | C | E | C | C |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| SMALLINT | I | I | E | C | C | C |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| DATE | C | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| TIME | C | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| DATETIME | C | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
| | | | | | | |
| INTERVAL | C | C | I | I | I | I |
| | | | | | | |
-----------------------------------------------------------------------------------------------------------
E=Equivalent C=Compatible I=Incompatible