HP OpenVMS Systems

ask the wizard
Content starts here


» close window

The Question is:

I have a command file containing the following line:
$  write sys$output f$getqui("DISPLAY_JOB","LOG_SPECIFICATION",,"THIS_JOB")
When submited without a /LOG qualifier, on OpenVMS VAX V6.2, it writes the
 fully specified log file name to the log file.  On OpenVMS Alpha V7.1, it
 writes nothing (which is what you would expect from reading other Ask the
 OpenVMS Wizard entries).  I like
 the VAX 6.2 behavior better, though.  I have old VAX code that seems to expect
 the Alpha behavior.
Why the difference?

The Answer is :

  The F$GETQUI LOG_SPECIFICATION itemcode is defined to be:
    the log file specification that was provided to the $SNDJBC
    service to create the job.
  Therefore, if you do not provide one -- which is what happens if you
  omit /LOG=file -- then LOG_SPECIFICATION is and should be null.
  While there may be a reasonable preference for the OpenVMS V6.2
  behaviour, that doesn't necessarily make it correct nor appropriate.
  The OpenVMS Wizard has found that all versions of OpenVMS -- both VAX
  and Alpha -- except OpenVMS Alpha V6.2 -- are consistent in that they
  all return a null string for SJC$_LOG_SPECIFICATION if the log file
  name is omitted from the /LOG qualifier.  This is also consistent with
  the OpenVMS documentation.
  Checks were performed with OpenVMS VAX V5.5-2, V6.1, V6.2, V7.2, V7.3,
  and OpenVMS Alpha V6.1, V6.2, V7.2, V7.3.
  Note too here that OpenVMS VAX V6.2 behaviour is consistent with all
  other releases tested, and only OpenVMS Alpha V6.2 behaves as you have
  Why is this the case?  Does that really matter?  The central issue here
  is that OpenVMS Alpha V6.2 is and was an anomoly, and the behaviour is
  unlikely to be changed on all other releases to match that behaviour.
  To change such behaviour can and would cause problems -- and clearly,
  the unusual behaviour of OpenVMS Alpha V6.2 was noticed and corrected.
  All this being the case or not, you can find the log specification with
  the following DCL:
    $ log_specification=f$getqui("display_job","log_specification",,"this_job")
    $ IF log_specification.EQS."".AND.-
    $ THEN
    $   log_specification=f$parse("",-
    $ ENDIF
  Note too that this code also takes into account JOB_LOG_NULL -- it will
  return a null string if the job was submitted with /NOLOG
  Existing discussions of the f$getqui lexical include the following
  topics: (813), (1240), (2159), (3951), (4546), (4568), (4903), (5188)
  (5471), (5567), (5651), (5793), (5982), (6315), (6877), (9130),
  (9863), etc.

answer written or last revised on ( 6-OCT-2004 )

» close window