The Question is:
I would like to capture the file name associated with:
example dcl code:
$ write sys$output f$trnlnm("sys$output")
I would expect to see
"somedisk:[somedirectory]variable-filename-to-capture.lis" instead I see the
original terminal name.
I would rather not add a "assign/define of sys$output" to the existing
Thanks for a reply.
The Answer is :
Please see information in the OpenVMS documentation set on the Process
Permanent File (PPF) structures for details on the handling of SYS$OUTPUT
and related PPF logical names, and for the format of the Internal File
Identifier (IFI) that is embedded within the logical name translation.
As there is no easy way to process this PPF and IFI information from
within DCL, the OpenVMS Wizard would encourage you to seek an alternate
solution or alternative approach to the problem. For example:
$ @procedure outputfile
$ define procedure_outputfile target
Where the procedure itself handles the output more directly.
If you wish to persist in special-casing the output -- something not
normally done within an OpenVMS component or application -- you will
want to use an application image to process the PPF and IFI, either
as an isolated image or in conjunction with the DCL procedure.
The output need not be a file specification, of course. NLA0: is quite
commonly used as an output device.
Digital Press offers a book on DCL programming which may be of interest
here, and the OpenVMS User's Guide can provide an introduction to the
topic. (See the FAQ for pointers.)
Without additional background on the particular problem being solved,
no more specific answer is possible.