[Info-vax] Porting logical name applications to Unix
P. Sture
paul.nospam at sture.ch
Mon Sep 28 10:31:56 EDT 2009
In article <mailman.16.1254094937.18305.info-vax_rbnsn.com at rbnsn.com>,
Paul Raulerson <paul at raulersons.com> wrote:
> For example, COBOL compilers can (and do) tend to make heavy use of
> environment variables. The idea of course is to use generic file
> names in the programs, and attach them at runtime.
>From the HP COBOL User Guide, Section 6.2 (Example 6-11):
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT F-DISK ASSIGN TO "MYENV".
DATA DIVISION.
FILE SECTION.
FD F-DISK.
01 DAT-RECORD PIC X(100).
"Setting environment variables at run time can help in moving
applications between OpenVMS Alpha or OpenVMS I64 and Tru64 UNIX
platforms without having to modify their source COBOL programs. You can
deÞne environment variables that access Þles in a way similar to that in
which you access Þles using logical names on OpenVMS systems. Thus, in
Example 611, the program is applicable to either Tru64 UNIX or to
OpenVMS, because MYENV can refer to an environment variable or to a
logical name."
That of course is with a view to COBOL program compatibility between VMS
and Tru64, and the example shows its use for file names only.
--
Paul Sture
More information about the Info-vax
mailing list