HP OpenVMS Systems

ask the wizard
Content starts here

Process Permanent Files? (SYS$OUTPUT)

» close window

The Question is:

I would like to capture the file name associated with:
$ @somedcl.com/output=variable-filename-to-capture
example dcl code:
$! somedcl.com
$ write sys$output f$trnlnm("sys$output")
$ exit
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
Any suggestions?
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
    $ @procedure
  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.

answer written or last revised on ( 25-FEB-2003 )

» close window