Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

COBOL85 / COBOL2000 compilers

&pagelevel(3)&pagelevel

The BS2000 compilers COBOL85 as of V2.3 and COBOL2000 can be called both from the BS2000 environment (using SDF) and the POSIX environment (shell), and controlled with options.

The following user manuals describe how to use the compilers:

Controlling compilers using the SDF interface

All compiler input and output possible in both the BS2000 file system (DMS/PLAM) and the POSIX file system:

  • Input of source programs

  • Input of copy elements

  • Output of LLMs

  • Output of compiler lists

  • Output of message lists

Combinations of these are also possible, i.e. inputting and outputting both BS2000 and POSIX files in a single compilation run.

Controlling compilers using the POSIX shell interface

COBOL compilers can be controlled from a POSIX environment using the POSIX command cobol.

All compiler input and output is carried out exclusively in the POSIX file system.

A link phase is also integrated into the cobol command. This enables the compiled objects to be linked into an executable unit.

The options and operands of the call commands above mainly cover the services and functions which are available with the compiler control over the SDF interface. The syntax of the POSIX command is oriented towards the shell commands used in UNIX systems.

Notes on CRTE

CRTE (Common RunTime Environment) provides the runtime environment for COBOL programs. CRTE is also a prerequisite for using the COBOL compiler.

Further information can be found in the COBOL compiler release notice.

Character sets for input and output files

The source programs and Include files can be available in EBCDIC code or ASCII code. This makes it possible to compile source programs from file systems which are located on a remote UNIX system. All files of a file system (local POSIX file system or mounted remote file system) must be available in the same character set, i.e. all files in the POSIX file system must be available in EBCDIC code and all files in the remote UNIX file system must be available in ASCII code.

The environment variable IO_CONVERSION must be assigned the value “YES” (see also "Copying and converting files").

The output character set of the text files (lists etc.) matches the character set of the target file system.
EBCDIC execution code is generally generated.

Executing COBOL applications

To access files in the POSIX file system using COBOL-IO, the COBOL program needs to be compiled using the option COMOPT ENABLE-UFS=YES, which is implicitly set by the POSIX command cobol. Programs compiled in this way can then process both BS2000 and POSIX files.

The issues described in the COBOL User Manual for COBOL programs executed under a POSIX shell also apply i. e. the following language elements are not supported:

  • CALL identifier

  • ENTRY

  • READ PREVIOUS

  • File processing with CODESET STANDARD.

Further differences in the functionality arise from differences in the system during file processing, especially tape processing with labels, concurrent processing of files and outputting checkpoints, and from assigning files. In exceptional cases, the PROSOS SIS code is made available over the file status data fields instead of the BS2000 DMS code.

No job variables such as job switches and user switches are available to control the application externally. Extended language elements are available to access the command line.