The C/C++ compiler supports the BS2000 file system (DMS files, PLAM libraries, etc.) as well as the POSIX file system. All inputs and outputs of the compiler in a compilation, preprocessor or syntax analysis
run can also be effected via POSIX files. This includes, in particular:
the input of source programs (see the SOURCE option in the COMPILE, PREPROCESS and CHECK-SYNTAX statements)
the input of header files (see the USER-INCLUDE-LIBRARY and STD-INCLUDE-LIBRARY options in the MODIFY-INCLUDE-LIBRARY statement)
the output of LLMs (see the MODULE-OUTPUT option in the COMPILE statement)
the output of recompilable source programs (see the OUTPUT option in the PREPROCESS statement)
the output of compiler listings (see the OUTPUT option in the MODIFY-LISTING-PROPERTIES statement)
the output of message lists (see the OUTPUT option in the MODIFY-DIAGNOSTIC-PROPERTIES statement)
the output of CIF information (see the OUTPUT option in the MODIFY-CIF-PROPERTIES statement)
Arbitrary combinations, i.e. the input and output of both BS2000 as well as POSIX files in the same compilation run, are also possible.
Storage of source programs and header files
Source programs and header files may exist in EBCDIC and ASCII codes. EBCDIC is the default in the POSIX file system; ASCII is the default for file systems on remote UNIX computers or PCs. All files of a file system (POSIX file system or attached remote file systems) must, however, be in the same respective (default) codeset. The compiler checks the codeset of a file system centrally, not for each individual file. Files of an ASCII file system are internally converted to EBCDIC for the compilation.
In contrast to program development in the POSIX shell (see the manual “POSIX commands of the C/C++ Compiler [1]), the file names of source programs need not always contain one of the standard suffixes “.c”, “.C” or “.i”.
Output of LLMs
The LLMs generated by the compiler can be written to POSIX object files (“.o” files). These LLM object files can only be processed meaningfully in the POSIX subsystem (by using the command cc, c11, c89 or CC; see the manual “POSIX commands of the C/C++ Compiler [1]). The generated object file format (LLM) is not supported on UNIX systems.
Other compiler outputs
Expanded recompilable source programs
The result of a preprocessor run can be written to a POSIX source file (“.i” file in C, “.I
” file in C++). This file can be processed further in the POSIX shell with the commandcc
,c89
orCC
and in the BS2000 environment via the SDF interface of the C/C++ compiler.Compiler listings
Compiler listings can be written to a POSIX list file (“.lst” file). This list file can be printed in the POSIX shell with the commandbs2lp
and in the BS2000 environment with the SDF command PRINT-DOCUMENT.Diagnostic messages
Error messages of the compiler can be written to a POSIX file (“.diag” file). This file can be read with a file editor such as EDT in the POSIX shell (edt
command) and in the BS2000 environment (see note on EDT on "Editing source programs").CIF information
The local CIF information for individual modules that is used to create global listings can be stored in a POSIX file (“.cif” file). These CIF files can be processed further in the POSIX shell with the commandcclistgen
(see the manual “POSIX Commands of the C/C++ Compiler [1]”) and via the SDF interface of the global listing generator in the BS2000 environment (see START-CPLUS-LISTING-GENERATOR, "Controlling the global listing generator").
Output codeset
The output codeset of the files (EBCDIC or ASCII) is determined by the codeset of the target file system. The compiler stores files in EBCDIC code in the POSIX file system and in ASCII code in file systems on UNIX computers.
Only EBCDIC execution code is generated. For example, the names of external entries are only stored in EBCDIC code.
Description of the term <posix-pathname>
When <posix-pathname> is specified as an input or output, the following can be specified:
a file name with no path specification
a relative path to a file
an absolute path to a file
a relative path to a directory
an absolute path to a directory
If no absolute path exists, the name/path is interpreted relative to the user’s home directory.
All directories in the path must already exist.
When an input file is requested, no directory may be specified.
When an input directory is requested, no file may be specified.
It only makes sense to specify an output file when a single source is processed. When multiple sources are processed, it is generally not permissible to specify an output file.
When the file name is created, it must be borne in mind that meaningful further processing of the output file in the POSIX subsystem is possible only if the name has a suitable suffix. When a directory is specified, the compiler itself determines the name of the output file (see section “Default names for output containers”.