Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

C and C++ compilers

&pagelevel(3)&pagelevel

The BS2000 compilers C/C++ can be called and controlled with options from both the BS2000 environment (with SDF) and from the POSIX environment (POSIX shell).

Compiler control via the SDF interface

All compiler I/O operations are possible both in the BS2000 file system (DMS/PLAM) and in the POSIX file system:

  • input of source programs

  • input of header files

  • output of LLM

  • output of recompilable source programs

  • output of compiler listings

  • output of message lists

  • output of CIF information

Any desired combinations are possible, i.e. input and output of both BS2000 and of POSIX files in the same compilation run.

The SDF interface of the compiler is described in the User Guide "C/C++ Compiler” [5].

Compiler control via the POSIX shell interface

The following POSIX commands are available for controlling the C/C++ compiler from the POSIX environment:

cc, c89

CC

cclistgen

Compiles C sources

Compiles C++ sources

Calls the global list generator in C/C++

These commands are described in detail in the manual "C/C++ POSIX Commands" [4].

All compiler input or output occurs exclusively in the POSIX file system.

A linkage stage in which the compiled objects can be linked to form an executable unit is also integrated into the cc, c89 and CC call commands.

The options and operands described in the above call commands largely cover the services and functions which are available with compiler control via the SDF interface. The syntax of the POSIX commands is based on the XPG4 standard definition and on the familiar shell commands in UNIX systems.

The compiler supports 64-bit arithmetic data types (long long). This is a prerequisite for programming access to large files in POSIX.

Notes on CRTE

Since CRTE (Common RunTime Environment) provides the runtime environment for C and C++ programs, it is required for using the C/C++ compiler.

The CRTE version required depends on the version of the compiler which is used. Further information can be found in the C/C++ compiler release notice.

Character sets for input/output files

Source programs and include files are available in EBCDIC or ASCII code, which means that it is also possible to compile source programs from file systems located on a remote UNIX system. All the files in a file system (local POSIX file system or linked 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 set to “YES” (see "Copying and converting files" for more information).

The output character set of text files (lists etc.) depends on the character set of the target file system.
In general, EBCDIC procedure code is generated.