COBOL Manual for TNS/E Programs (H06.03+)

Using HP COBOL in the OSS Environment
HP COBOL Manual for TNS/E Programs520347-003
19-8
OSS Pathnames in HP COBOL Source Programs
OSS Pathnames in HP COBOL Source Programs
Within an HP COBOL source program, OSS pathnames are allowed as system-
file-name parameters in these contexts:
In the File-Mnemonic clause of the SPECIAL-NAMES paragraph, for example:
SPECIAL-NAMES.
FILE "OSS /usr/test/fileID" IS A-FILE.
FILE "GUARDIAN $MYVOL.SUBVOL.FILEID" IS B-FILE.
FILE "OSS /G/MYVOL/SUBVOL/FILEID" IS C-FILE.
In the ASSIGN clause of a file-control entry, for example:
FILE-CONTROL.
SELECT A-FILE ASSIGN TO "OSS /usr/test/fileID".
SELECT B-FILE ASSIGN TO "GUARDIAN $MYVOL.SUBVOL.FILEID".
SELECT C-FILE ASSIGN TO "OSS /G/MYVOL/SUBVOL/FILEID".
Within an HP COBOL program, the maximum length of an OSS pathname is the
maximum length of a literal (160 characters).
OSS Files in HP COBOL Source Programs
The only OSS files that an HP COBOL program can use are line sequential files (see
Line Sequential Files
) and sequential files with fixed-length records and no alternate
keys. Relative files, indexed files, and sequential files with keys or variable-length
records must be Guardian files (Enscribe files), and their OSS pathnames must include
/G” or “GUARDIAN” (see OSS Pathnames for Guardian Files
). If the OSS pathname of
a sequential file does not include “/G” or “GUARDIAN,” then that file is an OSS
unstructured file. It has fixed-length records of the maximum record size. In contrast,
the default Guardian sequential file is entry-sequenced and can have variable-length
records.
#IN and #OUT
In the OSS environment, #IN and #OUT are the default input device (FD 0) and the
default output device (FD 1), respectively. You cannot use #IN and #OUT in SELECT
clauses or the SPECIAL-NAMES paragraph as you can in the Guardian environment.
Example 19-2. OSS Pathnames for Guardian Files
"GUARDIAN \qa.tests.cobol85.release4"
"GUARDIAN S.#PRNT2"
"OSS /G/tests.cobol85.release4"
"OSS /E/qa/G/$tests.cobol85.release4"
Note. If system-file-name is an OSS file, it cannot be a DEFINE name. If system-
file-name is a Guardian file, it can be DEFINE name.