Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!ihnp4.ucsd.edu!sdd.hp.com!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail
Newsgroups: comp.os.vms,comp.sys.dec,comp.answers,news.answers
Followup-To: poster
Distribution: world
X-Newsreader: mxrn 6.18-32C
From: [email protected] (Hoff Hoffman)
References: <[email protected]> <[email protected]> <[email protected]> <[email protected]>
Approved: [email protected]
Reply-To: [email protected]
Organization: HP
Subject: OpenVMS Frequently Asked Questions (FAQ), Part 5/11
Summary: This posting contains answers to frequently asked questions about
        the HP OpenVMS operating system, and the computer systems on which
        it runs.
Lines: 2300
Message-ID: <[email protected]>
Date: Sun, 04 Sep 2005 19:59:10 GMT
NNTP-Posting-Host: 16.32.80.251
X-Complaints-To: [email protected]
X-Trace: news.cpqcorp.net 1125863950 16.32.80.251 (Sun, 04 Sep 2005 12:59:10 PDT)
NNTP-Posting-Date: Sun, 04 Sep 2005 12:59:10 PDT
Xref: senator-bedfellow.mit.edu comp.os.vms:449758 comp.sys.dec:102378 comp.answers:61551 news.answers:296116

Archive-name: dec-faq/vms/part5
Posting-Frequency: quarterly
Last-modified: 02 Sep 2005
Version: VMSFAQ_20050902-05.TXT







                  System Management Information



         ________________________________________________________________
         Table 5-1 (Cont.)  PCSI Generation Number

                  _______________________________________________________
                  Generation
                  Number____________Generation_Source____________________

                  0050160000        V7.2-2

                  005017xxxx        V7.2-2 ECOs

                  0060000000        V7.3

                  006001xxxx        V7.3 ECOs

                  0060020000        V7.3-1

                  006003xxxx        V7.3-1 ECOs

                  0060100000        V7.3-2

                  006011xxxx        V7.3-2 ECOs

                  0070040000        V8.2

                  007005xxxx        V8.2 ECOs

                  0070060000        V8.2-1

         _________007007xxxx________V8.2-1_ECOs__________________________

         __________________________________________________________
         5.29  How can I tell what software (and version) is installed?

                  There is unfortunately no consistent nor single way to
                  make this determination-this is one of the reasons that
                  a move to PCSI installations is underway.

                  On OpenVMS Alpha, you can use VMSINSTAL.HISTORY and
                  PRODUCT SHOW PRODUCT to determine what packages have
                  been installed via the VMSINSTAL and PCSI tools,
                  respectively.

                  To see which OpenVMS Alpha ECO kits have been applied,
                  look in VMSINSTAL.HISTORY on OpenVMS Alpha prior to
                  V7.1-2, and use PRODUCT SHOW PRODUCT/FULL on OpenVMS
                  Alpha V7.1-2 and later.

                  On OpenVMS VAX, you can use PRODUCT SHOW PRODUCT and
                  (for software that is installed via VMSINSTAL on V7.3
                  and later) in VMSINSTAL.HISTORY.

                  5-44







                  System Management Information




                  For products installed on OpenVMS VAX prior to V7.3
                  using VMSINSTAL, there is no reliable way to determine
                  what products have been installed. If the product
                  provides a RELEASE_NOTES file (as many do), you
                  can look for the list of these files via DIRECTORY
                  SYS$HELP:*.RELEASE_NOTES. Again, this approach is NOT
                  reliable: some kits do not provide release notes, some
                  system managers will install only the release notes,
                  some system managers will delete release notes, and
                  release notes for multiple versions can be present.

                  On most packages, you can generally use ANALYZE/IMAGE
                  on one of the core images, looking at the image
                  identification area. Some of the product-specific
                  mechanisms available are:

                  o  DQS DQS$VERSION logical name

                  o  C CC/VERSION

                  o  C++ CXX/VERSION

                  o  TCP/IP TCPIP SHOW VERSION command

         __________________________________________________________
         5.30  What file checksum tools are available for OpenVMS?

                  The undocumented (prior to V8.2) DCL command CHECKSUM
                  is the usual means, and provides a rather simple-minded
                  checksum suitable to detect basic file corruptions.
                  Starting with V8.2, additional algorithms beyond the
                  classic XOR scheme are available.

                  One of the most common schemes beyond the CHECKSUM
                  XOR scheme is MD5, and information and a source code
                  example are available via the MD5 RFC. As of this
                  writing, pre-built versions of MD5 are expected to be
                  made available at or via the OpenVMS Freeware website
                  ( http://www.hp.com/go/openvms/freeware/ ), and MD5 is
                  expected to be made available on an OpenVMS Freeware
                  release after V7.0. Also see the CHECKSUM/ALGORITHM=MD5
                  command on OpenVMS V8.2 and later.


                                                                     5-45







                  System Management Information




                  The OpenVMS Alpha ECO (patch) kit checksums available
                  at the ECO website are determined using the following
                  DCL command sequence:

                  $ CHECKSUM kitname.pcsi-dcx_axpexe
                  $ SHOW SYMBOL CHECKSUM$CHECKSUM

                  See Section 5.17 for information on acquiring OpenVMS
                  ECO (patch) kits.

         __________________________________________________________
         5.31  What (and where) is the OpenVMS Management Station?

                  For information and current kits for the OpenVMS
                  Management Station (OMS), a PC-based tool that permits
                  you to manage an OpenVMS system, please see:

                  o  http://www.openvms.compaq.com/openvms/products/argus/

         __________________________________________________________
         5.32  How to determine current disk fragmentation level?

                  The HP OpenVMS Disk File Optimizer (DFO)
                  defragmentation package provides a fragmentation
                  monitoring tool, and a DFO product authorization key
                  (PAK) is not required for the fragmentation reporting
                  tool:

                  $ DEFRAG SHOW/VOLUME ddcu:

                  The DFU tool available on the OpenVMS Freeware can
                  generate a report on the disk fragmentation:

                  DFU> REPORT ddcu:

         __________________________________________________________
         5.33  SYSBOOT-I-FILENOTLOC, Unable to locate SYS$CPU_ROUTINES?

                  A message at the OpenVMS Alpha bootstrap such as the
                  following:

                  %SYSBOOT-I-FILENOTLOC, Unable to locate
                    SYS$CPU_ROUTINES_1C02.EXE
                  %SYSBOOT-E-LDFAIL, failed to load execlet,
                    status = 00000910

                  5-46







                  System Management Information




                  indicates that the particular OpenVMS Alpha release
                  does not contain support for the target platform. In
                  this case, OpenVMS does not recognize Alpha family 1C
                  member 02 as a supported platform. A later version of
                  OpenVMS might support the platform, or there might be
                  no support on any release. Ensure that you have the
                  most current firmware, and review the minimum version
                  requirements for the platform.

                  The execlet load failure and other similar bootstrap
                  status values can often be decoded using either of the
                  following techniques:

                  $ exit %x910
                  %SYSTEM-W-NOSUCHFILE, no such file
                  $

                  $ x = f$message(%x910)
                  $ show symbol x
                    X = "%SYSTEM-W-NOSUCHFILE, no such file"
                  $

                  Also see Section 14.4.4.1.

         __________________________________________________________
         5.34  How can I customize the DCPS device control for a new
               printer?

                  To customize DCPS for an otherwise unsupported printer,
                  you can try the following sequence:

                  o  Extract the most closely-associated setup modules
                     from the existing device control library,
                     DCPS$DEVCTL.TLB. (For instance, you can probably
                     extract and use the HP LaserJet 4000 series
                     definitions for the HP LaserJet 4050 series. Each
                     printer will vary, please consult the printer
                     documentation for specifics and requirements.)

                  o  rename each extracted setup module to a
                     corresponding:

                     LPS$$UNRECOGNIZED_*

                                                                     5-47







                  System Management Information




                  o  Insert all of the above-renamed setup modules into a
                     newly-created device control library specific to the
                     new printer:

                     $ LIBRARY/TEXT/CREATE -
                         SYS$COMMON:[SYSLIB]HP4050_DEVCTL.TLB
                         LPS$$UNRECOGNIZED*

                     The above assumes the filename HP4050_DEVCTL.TLB,
                     alter as required.

                  o  Set up your DCPS startup procedures to include a
                     search-list logical name such as:

                     $ DEFINE/SYSTEM/EXECUTIVE DCPS_HP4050_LIB  -
                         SYS$LIBRARY:HP4050_DEVCTL.TLB, -
                         SYS$LIBRARY:DCPS$DEVCTL.TLB

                  o  Supply DCPS_HP4050_LIB as the library parameter
                     in the queue startup for this printer, this
                     is the P3 parameter to the command procedure
                     SYS$STARTUP:DCPS$EXECUTION_QUEUE.COM.

                  o  The HP4050_DEVCTL library may/will need to be
                     recreated and modules re-edited and replaced with
                     each DCPS upgrade, particularly if any modules
                     are updated in the original library. You will also
                     want to determine if the upgraded version of DCPS
                     directly supports the particular printer.

                  o  To customize the processing of file extensions
                     within DCPS (to enable or disable graybar output,
                     for instance), use the information available in:

                     SYS$LIBRARY:DCPS$FILE_EXTENSION_DATA_TYPE.DAT_DEFAULT

                  to create your own site-specific:

                  SYS$LIBRARY:DCPS$FILE_EXTENSION_DATA_TYPE.DAT

                  Also see Section 5.15.

         __________________________________________________________
         5.35  Why do $GETDEV MOUNTCNT and SHOW DEVICE mount counts
               differ?

                  MOUNTCNT returns the local mount count, while SHOW
                  DEVICE returns the cluster-wide mount count.

                  5-48







                  System Management Information



         __________________________________________________________
         5.36  What software is needed for Postscript printers?

                  The NorthLake PrintKit (www.nls.com) and DECprint
                  Supervisor (DCPS) are common choices for support of
                  Postscript printers on OpenVMS.

                  o  http://www.nls.com/

                  o  http://www.openvms.compaq.com/openvms/Print/print_
                     sw_prods.html

                  You may also require the installation of an IP
                  transport stack.

                  Also please see Section 15.2.2 and Section 15.2.3.

         __________________________________________________________
         5.37  How do I remove a PCSI-installed patch (ECO) kit?

                  You cannot PRODUCT REMOVE a PCSI patch (ECO) kit.

                  In order to remove an ECO kit, PCSI would have to have
                  copies of all the other version of the files from
                  all other patches and products that previously were
                  installed. This can clearly involve a large number of
                  files and a large archive of old file versions and a
                  substantial quantity of disk space. While removal is
                  clearly theoretically possible, it is not currently
                  implemented.

                  The following is the supported mechanism to remove a
                  PCSI patch kit.

                  1  Execute a PRODUCT SHOW PRODUCT product-name. /FULL
                     command. The "maintenance" column (132 column width)
                     shows the patches that have been installed. Keep a
                     copy of this listing.

                  2  Acquire kits for all of the maintenance kits listed.

                  3  Re-install the prior FULL version of the product.
                     This will remove all patch kits, setting to product
                     back to "original" condition.

                  4  Re-install all the patches in the list from step 1,
                     except those patches which you have determined you
                     do not want.

                                                                     5-49







                  System Management Information




                  The above information also applies to PCSI PARTIAL
                  kits.

         __________________________________________________________
         5.38  SYSINIT-E, error mounting system device, status=0072832C

                  This message can arise during an OpenVMS system
                  bootstrap...

                  %MOUNT-F-DIFVOLMNT, different volume already mounted on this device

                  For details and further information, use the DCL
                  command:

                  $ HELP/MESSAGE /STATUS=%X72832C

         __________________________________________________________
         5.39  Resolving License PAK Problems?

                  The PAK release date, the PAK termination date, and
                  the PAK version are the usual culprits when a license
                  product authorization key (PAK) check failure occurs.

                  The PAK termination date is the date when the license
                  PAK will expire.

                  The PAK release date is the date of the most recent
                  release date of the software package that will be
                  permitted by the particular license PAK. (The release
                  date check is analogous to a product version check.)
                  The PAK version indicates the most recent product
                  version that is permitted by the license.

                  Having multiple license PAKs registered (and active)
                  can also cause problems if an expired PAK gets loaded.
                  You will want to DISABLE license PAKs you do not wish
                  to have loaded.

                  Other problems include a failure to register each PAK
                  in all license databases throughout a multiple-system-
                  disk cluster, with a consistent set of /INCLUDE lists
                  specified across each of the duplicated PAKs.

                  Additionally, you could have an invalid LMF$LICENSE
                  logical name defined. (If no LMF$LICENSE logical
                  name is defined, the standard license database named
                  SYS$SYSTEM:LMF$LICENSE.LDB will be used.)

                  5-50







                  System Management Information




                  You can display license failures by defining the
                  following logical name:

                  $ DEFINE/SYS/EXEC LMF$DISPLAY_OPCOM_MESSAGE TRUE

                  Enable your terminal as a license operator
                  (REPLY/ENABLE=LICENSE), define the LMF$DISPLAY_
                  OPCOM_MESSAGE logical name, and then try the failing
                  operation again. You should see one or more OPCOM
                  messages displayed.

                  If you have the LMF$DISPLAY_OPCOM_MESSAGE logical name
                  defined, you can (will?) see spurious license check
                  failures-various products will check for multiple
                  licenses, and a few products will check for PAKs that
                  either have not yet been or will not be issued. Once
                  you figure out which license has failed, you will want
                  to deassign this logical name.

                                            Note

                     That there are no license check failures does not
                     indicate that the particular product or operation
                     or use is permissible per applicable licensing
                     agreements. Please consult the applicable
                     agreement(s) for licensing-related information
                     and requirements.

                  To register a license PAK on a DECwindows system
                  when DECwindows cannot start (because of an expired
                  license or other licensing problem), follow the steps
                  outlined in section Section 5.6 up through the use
                  of the AUTHORIZE command. In place of the AUTHORIZE
                  command, use the console to register the license PAKs.
                  Also see Section 12.4 for licensing and troubleshooting
                  information.

                  For information on licensing and on the numbers of
                  license units required for various products and various
                  platforms, the License Unit Requirements Table (LURT)
                  is available at:

                  o  http://www.compaq.com/products/software/info/

                                                                     5-51







                  System Management Information



         __________________________________________________________
         5.40  Changing the OpenVMS Version Number?

                  Fool your friends, baffle your enemies, run the OpenVMS
                  version of your choice!

                  On OpenVMS Alpha systems:

                  $ SET DEFAULT SYS$COMMON:[SYS$LDR]
                  $ RUN SYSVER
                  REPLACE V9.9
                  WRITE
                  $ EXIT

                  On OpenVMS VAX systems:

                  $ set default SYS$COMMON:[SYS$LDR]
                  $ copy SYS.EXE SYS.EXE_IN-CASE-I-FAIL
                  $ patch SYS.EXE
                  define sys$gq_version=800044b8
                  set mode ascii
                  !examine sys$gq_version
                  !examine sys$gq_version+4
                  deposit sys$gq_version   = "V9.9"
                  deposit sys$gq_version+4 = "    "
                  update
                  exit
                  $ Exit

                  Then reboot the system at your leisure.

         __________________________________________________________
         5.41  How to prevent users from choosing obvious passwords?

                  To prevent users from selecting obvious passwords on
                  OpenVMS, you will want to use the reserved password
                  (password screening) mechanism. Effectively, you merge
                  your list of reserved passwords into the existing
                  reserved words database maintained by OpenVMS. (You can
                  also then require all users to reset their passwords-
                  via the pre-expired password mechanism-thus forcing
                  users to select new passwords.) For details on the
                  password screening mechanism, of the reserved password
                  database (VMS$PASSWORD_DICTIONARY.DATA), and details
                  of how to merge your list of prohibited passwords
                  into the database, please see the associated chapter
                  in the OpenVMS security manual. For details of the

                  5-52







                  System Management Information




                  password expiration mechanism, see the AUTHORIZE
                  command qualifier /PWDEXPIRED.

                  You can also implement a site-specific password filter
                  with the information provided in the back of the
                  OpenVMS Programming Concepts manual. The password
                  filter permits you to establish particular and site-
                  specific password requirements. For details, please
                  see the system parameter LOAD_PWD_POLICY and the
                  programming concepts manual, and see the examples in
                  SYS$EXAMPLES:. (Examples and documentation on V7.3
                  and later reflect both platforms, the examples are
                  found only on OpenVMS VAX kits on earlier releases.
                  The capabilities have existed on both the VAX and Alpha
                  platforms for some time now.)

                  To verify current passwords, you can also use a
                  technique known to system crackers as the "dictionary
                  attack" - the mechanism that makes this attack somewhat
                  more difficult on OpenVMS is the hashing scheme used on
                  OpenVMS, and the file protections used for the SYSUAF
                  authorization database. Given a dictionary of words and
                  the unprotected contents of the SYSUAF file, a search
                  for obvious passwords can be performed. Interestingly,
                  a "dictionary attack" also has the unfortunate side-
                  effect of exposing the password to the user-while this
                  is clearly the goal of a system cracker, authorized
                  privileged and non-privileged system users should not
                  know nor have access to the (cleartext) passwords of
                  other users.

                  Accordingly, OpenVMS does not store the cleartest
                  password. Further, OpenVMS uses a password hashing
                  algorithm, not an encryption algorithm. This means that
                  storage of a cleartext password is deliberated avoided,
                  and the cleartext value is deliberately very difficult
                  to obtain. The hash is based on a Purdy Polynomial,
                  and the hash itself includes user-specific values in
                  addition to the password, values that make the results
                  of the password hash unique to each user.

                  Regardless of the use of a password hashing scheme, if
                  a copy of your password file should become available to
                  a system cracker, you will want to force all users to
                  use new passwords immediately.

                                                                     5-53







                  System Management Information




                  If you should require a user to verify a password,
                  use the username, the user's salt value (this value
                  is acquired via $getuai) and the user's specified
                  cleartext password, and compare the resulting hashed
                  value (using a call to $hash_password) against the
                  saved hashed password value (this value also acquired
                  via $getqui). For reasons of security, avoid saving
                  a cleartext password value in any data files, and do
                  not maintain the cleartext password in memory longer
                  than required. (Use of sys$acm on V7.3-1 and later is
                  recommended.)

                  Kerberos authentication (client and server) is
                  available on OpenVMS V7.3 and later. Integration of
                  Kerberos support into various Compaq and into third-
                  party products is expected.

                  External authentication is available in V7.3-1
                  and later, with support for user-written external
                  authentication in V7.3-2 and later.

                  If you are simply looking for OpenVMS access and
                  the SYSTEM and all other privileged passwords are
                  forgotten or otherwise unavailable, please see section
                  Section 5.6 and/or the OpenVMS documentation set.

                  Also please see the NCSC C2 guidelines in the OpenVMS
                  security manual.

         __________________________________________________________
         5.42__Please_help_me_with_the OpenVMS BACKUP utility?

         5.42.1  Why isn't BACKUP/SINCE=BACKUP working?

                  If you are seeing more files backed up than previously,
                  you are seeing the result of a change that was made to
                  ensure BACKUP can perform an incrementation restoration
                  of the files. In particular, if a directory file
                  modification date changes, all files underneath it are
                  included in the BACKUP, in order to permit incremental
                  restoration should a directory file get renamed.



                  5-54







                  System Management Information



         _____________________________
         5.42.1.1  Why has OpenVMS gone through the agony of this change?

                  When a directory is renamed, the modified date is
                  changed. When the restoration needs to restore the
                  directory and its contents, and the restoration should
                  not result in the restoration of the older directory
                  name when a series of incremental BACKUPs are restored.
                  Thus an incremental BACKUP operation needs to pick up
                  all of the changes.

                  Consider performing an incremental restoration, to
                  test the procedures. This testing was how OpenVMS
                  Engineering found out about the problem that was
                  latent with the old BACKUP selection scheme-the
                  old incremental BACKUP scheme would have missed
                  restoring any files under a renamed directory. Hence
                  the change to the selection mechanisms mentioned in
                  Section 5.42.1.

         _____________________________
         5.42.1.2  Can you get the old BACKUP behaviour back?

                  Yes, please see the /NOINCREMENTAL qualifier available
                  on recent OpenVMS versions (and ECO kits). Use of
                  this qualifier informs BACKUP that you are aware of
                  the limitations of the old BACKUP behaviour around
                  incremental disk restorations.

         _____________________________
         5.42.2  What can I do to improve BACKUP performance?

                  Use the documented commands in the manual for
                  performing incremental BACKUPs. Use the documented
                  incremental procedures. Don't try to use incremental
                  commands in a non-incremental context.

                  Also consider understanding and then using /NOALIAS,
                  which will likely be a bigger win than will anything to
                  do with the incremental BACKUPs, particularly on system
                  disks and any other disks with directory aliases.

                  See the OpenVMS documentation for additional details.


                                                                     5-55







                  System Management Information




                  Ignoring hardware performance and process quotas, the
                  performance of BACKUP during a disk saveset creation is
                  typically limited by three factors:

                  1  Default extend size

                     The default behavior can have poor performance,
                     as the extend operation can involve extensive
                     additional processing and I/O operations. Consider
                     changing the default extend value on the volume, or
                     change the extend for the process:

                     $ set rms/extend=65000

                  2  Output IO size

                     The default IO size for writing an RMS sequential
                     file is 32 blocks, an increase from the value of
                     16 blocks used on earlier versions. Setting this to
                     the maximum of 127 can reduce the number of IOs by
                     almost a factor of 4:

                     $ set rms/block=127

                     Note that the performance might be better on some
                     controllers if the block count is a multiple of 4 -
                     e.g. 124

                  3  Synchronous writes to the saveset

                     Starting with OpenVMS V7.3, you can now persuade
                     RMS to turn on write-behind for sequential files
                     opened unshared. (Please see the V7.3 release notes
                     or more recent documentation for details.) Enabling
                     the write-behind operations involves setting the
                     dynamic system parameter RMS_SEQFILE_WBH to 1.
                     This parameter is dynamic, and it can be enabled
                     and disabled without a reboot, and changes in its
                     setting can and will directly effect the running
                     system. In order to get the full benefit from write-
                     behind operations, you also need to increase the
                     RMS local buffer count from the default of 2 to a
                     larger number. Raising the value to 10 is probably a
                     reasonable first estimate for this value.

                  5-56







                  System Management Information




                     $ run sys$system:sysman
                     PARAMETERS USE ACTIVE
                     PARAMETERS SET RMS_SEQFILE_WBH 1
                     PARAMETERS WRITE ACTIVE
                     EXIT
                     $ SET RMS/BUFFER=10/EXTEND=65000/BLOCK=127
                     $ BACKUP source-specification ddcu:[dir]saveset.bck/SAVE

         _____________________________
         5.42.3  Why is BACKUP not working as expected?

                  First, please take the time to review the BACKUP
                  documentation, and particularly the BACKUP command
                  examples. Then please download and install the most
                  current BACKUP eco kit. Finally, please please set the
                  process quotas per the System Management documentation.
                  These steps tend to resolve most problems seen.

                  BACKUP has a very complex interface, and there
                  are numerous command examples and extensive user
                  documentation available. For a simpler user interface
                  for BACKUP, please see the documentation for the
                  BACKUP$MANAGER tool.

                  As for recent BACKUP changes, oddities, bugs, etc:

                  o  A change made in OpenVMS V6.2 WILL cause more files
                     to be included into a file-based BACKUP saveset
                     using /SINCE=BACKUP as all files underneath any
                     directory with a sufficiently recent (selected)
                     date will be included in the saveset. This change
                     was deliberate and intentional, and was mandated
                     by the need to provide a functional incremental
                     restoration.

                     Without the inclusion of these apparently-extra
                     files, an incremental saveset can NOT be reliably
                     restored.

                  o  As part of the OpenVMS V6.2 change, the /SINCE
                     command-without the specification of the =BACKUP
                     keyword-selected more files than it should have.
                     This is a bug. This bug has been remedied in the
                     OpenVMS BACKUP source code and in some of (all of?)
                     the BACKUP ECO kits.

                                                                     5-57







                  System Management Information




                  When working with BACKUP, you will want to:

                  o  Ensure you have your process quotas set per the
                     recommendations in the OpenVMS System Management
                     documentation. Deviation from these values can and
                     will lead to access violation (ACCVIO) and other
                     untoward behaviour.

                  o  Get the current BACKUP ECO kit and install it BEFORE
                     you attempt to troubleshoot any problems.

                  o  Learn about the /NOINCREMENTAL (new) and /NOALIAS
                     (V6.2 and later) command qualifiers. The former
                     qualifier returns to the pre-V6.2 behaviour of the
                     /SINCE file selection mechanism, while the latter
                     (specified with /IMAGE) reduces the replication
                     of files on system disks and other disks with file
                     alias and directory alias entries. Both of these can
                     reduce the numbers of files that will be selected
                     and thus included into the saveset.

                     Learn what /IGNORE=INTERLOCK means. This command
                     probably does not provide what you think it does-
                     those file system interlocks that this command is
                     ignoring were implemented for a reason, after all.
                     Ignoring these interlocks can lead to missed data
                     and potentially to corruptions to individual files
                     stored within the output saveset, corruptions that
                     may or may not be reported. For details on this
                     BACKUP command qualifier, please see the Ask The
                     Wizard topic (2467).

                  When working with the BACKUP callable API:

                  o  Build your applications with the most current BACKUP
                     API available. Changes made to the V7.1-2 and V7.2
                     API were incompatible with the V7.1 and V7.2-1 and
                     later APIs, and this incompatibility was repaired
                     via a BACKUP ECO kit. Do NOT build your application
                     with the versions of the BACKUP API that shipped
                     with V7.1-2 and V7.2, as these are incompatible with
                     the BACKUP API constants that were used on other
                     versions.

                  5-58







                  System Management Information



         _____________________________
         5.42.4  How do I fix a corrupt BACKUP saveset?

                  BACKUP savesets can be corrupted by FTP file transfers
                  and by tools such as zip (particularly when the zip
                  tool has not been asked to save and restore OpenVMS
                  file attributes or when it does not support OpenVMS
                  file attributes), as well as via other means of
                  corruptions.

                  If you have problems with the BACKUP savesets after
                  unzipping them or after an FTP file transfer, you can
                  try restoring the appropriate saveset attributes using
                  the tool:

                  $ @RESET_BACKUP_SAVESET_FILE_ATTRIBUTES.COM

                  This tool is available on the OpenVMS Freeware (in
                  the [000TOOLS] directory). The Freeware is available
                  at various sites-see the Freeware location listings
                  elsewhere in the FAQ-and other similar tools are also
                  available from various sources.

                  In various cases, a SET FILE/ATTRIBUTES command can
                  also be used. As the parameters of this command must be
                  varied as the target BACKUP saveset attributes vary,
                  this approach is not recommended.

                  Also see the "SITE VMS", /FDL, and various other file-
                  attributes options available in various FTP tools. (Not
                  all available FTP tools support any or all of these
                  options.)

                  Browser downloads (via FTP) and incorrect (binary or
                  ascii FTP transfer modes) are notorious for causing
                  RMS file corruptions and particularly BACKUP saveset
                  corruptions. You can sometimes help encourage the
                  browser to select the correct FTP transfer type code
                  (via RFC1738):

                  o  ftp://host/urlname.ext;type=i ! request ftp
                     image/binary transfer

                  o  ftp://host/urlname.ext;type=a ! request ftp
                     ascii/text transfer

                                                                     5-59







                  System Management Information




                  You can also often configure the particular web browser
                  to choose the appropriate transfer mode by default,
                  based on the particular file extensions, using a
                  customization menu available in most web browsers. You
                  can select that the specific file extentions involved
                  use the FTP binary transfer mode, which will reduce the
                  number of corruptions seen.

         _____________________________
         5.42.5  How do I write a BACKUP saveset to a remote tape?

                  How to do this correctly was described at DECUS long
                  ago. On the OpenVMS host with the tape drive, create
                  the following SAVE-SET.FDL file:

                  RECORD
                          FORMAT                  fixed
                          SIZE                    8192

                  Then create BACKUP_SERVER.COM:

                  $ !
                  $ ! BACKUP_SERVER.COM - provide remote tape service for BACKUP.
                  $ !
                  $ set noon
                  $ set rms/network=16
                  $ allocate mka500 tapedev
                  $ mount/nounload/over:id/block=8192/assist tapedev
                  $ convert/fdl=SAVE-SET sys$net tapedev:save-set.
                  $ dismount/unload tapedev
                  $ stop/id=0

                  On the node where you want to do the backup, use the
                  DCL command:

                  $ backup -
                      srcfilespec -
                      node"user pwd"::"task=backup_server"/block=8192/save

                  One area which does not function here is the volume
                  switch; multi-reel or multi-cartridge savesets. Since
                  the tape is being written through DECnet and RMS and
                  the magtape ACP, BACKUP won't see the media switch
                  and will split an XOR group across the reel boundary.
                  BACKUP might well be willing to read such a multi-
                  reel or multi-cartridge saveset (directly, not over

                  5-60







                  System Management Information




                  the net) as the XOR blocks are effectively ignored
                  until and unless needed for error recovery operations.
                  BACKUP likely will not be able to perform an XOR-based
                  recovery across reel or cartridge boundaries.

                  Unfortunately BACKUP can't read tapes over the network
                  because the RMS file attributes on a network task
                  access look wrong; the attributes reported include
                  variable length records.

         _____________________________
         5.42.6  How to perform a DoD security disk erasure?

                  Sometimes refered to as disk, tape, or media
                  declassification, as formatting, as pattern erasure,
                  or occasionally by the generic reference of data
                  remanence. Various references to the US Deparment of
                  Defence (DoD) or NCSC "Rainbow Books" documentation are
                  also seen in this context.

                  While this erasure task might initially appear quite
                  easy, basic characteristics of the storage media and
                  of the device error recovery and bad block handling
                  can make this effort far more difficult than it might
                  initially appear.

                  Obviously, data security and sensitivity, the costs
                  of exposure, applicable legal or administrative
                  requirements (DoD, HIPPA or otherwise), and the
                  intrinsic value of the data involved are all central
                  factors in this discussion and in the decision of the
                  appropriate resolution, as is the value of the storage
                  hardware involved.

                  With data of greater value or with data exposure
                  (sometimes far) more costly than the residual value
                  of the disk storage involved, the physical destruction
                  of the platters may well be the most expedient,
                  economical, and appropriate approach. The unintended
                  exposure of a bad block containing customer healthcare
                  data or of credit card numbers can quite be costly,
                  of course, both in terms of the direct loss, and the
                  longer-term and indirect costs of such exposures.

                                                                     5-61







                  System Management Information




                  Other potential options include the Freeware RZDISK
                  package, the OpenVMS INITIALIZE/ERASE command (and
                  potentially in conjunction with the $erapat system
                  service) and OpenVMS Ask The Wizard (ATW) topics
                  including (841), (3926), (4286), (4598), and (7320).
                  For additional information on sys$erapat, see the
                  OpenVMS Programming Concepts manual and the OpenVMS
                  VAX examples module SYS$EXAMPLES:DOD_ERAPAT.MAR. Some
                  disk controllers and even a few disks contain support
                  for data erasure. Some DSSI Disk ISEs, for instance.

                  For the prevention of casual disk data exposures,
                  a generic INITIALIZE/ERASE operation is probably
                  sufficient. This is not completely reliable,
                  particularly if the data is valuable, or if legal,
                  administrative or contractual restrictions are
                  stringent-there may well be revectored blocks that
                  are not overwritten or not completely overwritten by
                  this erasure, as discussed above, and these blocks can
                  obviously contain at least part of most any data that
                  was stored on the disk - but this basic disk overwrite
                  operation is likely sufficient to prevent the typical
                  information disclosures.

                  You will want to consult with your site security
                  officer, your corporate security or legal office, with
                  HP Services or your prefered service organization,
                  or with a firm that specializes in erasure or data
                  declassification tasks. HP Services does traditionally
                  offer a secure disk declassification service.

         _____________________________
         5.42.7  How to enable telnet virtual terminals?

                  To enable virtual terminal support for telnet and
                  rlogin devices, add the following logical name
                  definitions into SYLOGICALS.COM:

                  $ DEFINE/SYSTEM/EXECUTIVE TCPIP$RLOGIN_VTA TRUE
                  $ DEFINE/SYSTEM/EXECUTIVE TCPIP$TELNET_VTA TRUE

                  See SYS$STARTUP:SYLOGICALS.TEMPLATE for details on the
                  typical contents of SYLOGICALS.COM.

                  5-62







                  System Management Information




                  In SYSTARTUP_VMS.COM, ensure that a command similar to
                  the following is invoked:

                  $ SYSMAN IO CONNECT VTA0/NOADAPTER/DRIVER=SYS$LOADABLE_IMAGES:SYS$TTDRIVER.EXE

                  In MODPARAMS.DAT, add the following line or (if already
                  present) mask the specified hexidecimal value into an
                  existing TTY_DEFCHAR2, and perform a subsequent AUTOGEN
                  with an eventual reboot:

                  TTY_DEFCHAR2 = %X20000

                  This value is TT2$M_DISCONNECT.

                  On older TCP/IP Services-versions prior to V5.0-you
                  will have to perform the following UCX command:

                  $ UCX
                  UCX> SET CONF COMM/REMOTE=VIRTUAL

         _____________________________
         5.42.7.1  Volume Shadowing MiniCopy vs MiniMerge?

                  MiniMerge support has been available for many years
                  with OpenVMS host-based volume shadowing, so long as
                  you had MSCP controllers (eg: HSC, HSJ, or HSD) which
                  supported the Volume Shadowing Assist known as "Write
                  History Logging".

                  If you are interested in mini-merge and similar
                  technologies, please see the Fibre Channel webpage
                  and the information available there:

                  o  http://www.openvms.compaq.com/openvms/fibre/

                  Mini-Merge support was originally intended to be
                  controller-based and was expected with HSG80 series
                  storage controllers and was expected to require ACS 8.7
                  and OpenVMS Alpha V7.3-1.

                  Host-based Mini-Merge (HBMM) is now available for
                  specific OpenVMS releases via a shadowing ECO kit,
                  and is also present in OpenVMS V8.2 and later. HBMM
                  applies to the HSG80 series and-like host-based volume
                  shadowing-to most other (all other?) supported storage
                  devices.

                                                                     5-63







                  System Management Information




                  The following sections describe both Mini-Copy and
                  Mini-Merge, and can provide a basis for discussions.

         _____________________________
         5.42.7.1.1  Mini-Copy?

                  A Shadowing Full Copy occurs when you add a disk to an
                  existing shadowset using a MOUNT command; the entire
                  contents of the disk are effectively copied to the
                  new member (using an algorithm that goes through in
                  127-block increments and reads one member, compares
                  with the target disk, and if the data differs, writes
                  the data to the target disk and loops back to the
                  read step, until the data is equal for that 127-
                  block section). (This is one of the reasons why the
                  traditional recommendation for adding new volumes to
                  a shadowset was to use a BACKUP/PHYSICAL copy of an
                  existing shadowset volume, simply because the reads
                  then usually matched and thus shadowing usually avoided
                  the need for the writes.)

                  If you warn OpenVMS ahead of time (at dismount time)
                  that you're planning to remove a disk from a shadowset
                  but re-add it later, OpenVMS will keep a bitmap
                  tracking what areas of the disk have been modified
                  while the disk was out of the shadowset, and when you
                  re-add it later with a MOUNT command OpenVMS only has
                  to update the areas of the returned disk that the bit-
                  map indicates are now out-of-date. OpenVMS does this
                  with a read source / write target algorithm, which is
                  much faster than the shenanigans the Full Copy does,
                  so even if all of the disk has changed, a Mini-Copy is
                  faster than a Full Copy.

         _____________________________
         5.42.7.1.2  Mini-Merge?

                  A Shadowing Merge is initiated when an OpenVMS node
                  in the cluster (which had a shadowset mounted) crashes
                  or otherwise leaves unexpectedly, without dismounting
                  the shadowset first. In this case, OpenVMS must ensure
                  that the data is identical, since Shadowing guarantees
                  that the data on the disks in a shadowset will be
                  identical. In a regular Merge operation, Shadowing uses

                  5-64







                  System Management Information




                  an algorithm similar to the Full Copy algorithm (except
                  that it can choose either of the members' contents
                  as the source data, since both are considered equally
                  valid), and scans the entire disk. Also, to make things
                  worse, for any read operations in the area ahead of
                  what has been merged, Shadowing will first merge the
                  area containing the read data, then allow the read to
                  occur.

                  A Merge can be very time-consuming and very I/O
                  intensive. If a node crashes, the surviving nodes can
                  query to determine what exact areas of the disk the
                  departed node was writing to just before the crash,
                  and thus Shadowing only needs to merge just those few
                  areas, so this tends to take seconds, as opposed to
                  potentially requiring many minutes or even hours for a
                  regular full Merge.

         __________________________________________________________
         5.43  Please explain DELETE/ERASE and File Locks?

                  DELETE/ERASE holds the file lock and also holds a
                  lock on the parent directory for the duration of the
                  erasure. This locking can obviously cause an access
                  conflict on either the file or on the directory-
                  it might well pay to rename files into a temporary
                  directory location before issuing the DELETE/ERASE,
                  particularly for large files and/or for systems with
                  multiple overwrite erase patterns in use; for any
                  systems where the DELETE/ERASE erasure operation will
                  take a while.

         __________________________________________________________
         5.44  Managing File Versions?

                  Some applications will automatically roll file
                  version numbers over, and some will require manual
                  intervention. Some will continue to operate without the
                  ability to update the version, and some will be unable
                  to continue. Some sites will specifically (attempt to)
                  create a file with a version of ;32767 to prevent the
                  creation of additional files, too.


                                                                     5-65







                  System Management Information




                  To monitor and resolve file versions, you can use
                  commands including:

                  $ SET FILE/VERSION_LIMIT=n filename
                  $ SET DIRECTORY/VERSION_LIMIT=n [directory]

                  And you can also monitor file version numbers, and
                  can report problems with ever-increasing file versions
                  to the organization(s) supporting the application(s)
                  generating files with ever-increasing version numbers
                  for details on potential problems, and for any
                  recommendations on resetting the version numbers for
                  the particular product or package. If required, of
                  course.

                  The following pair of DCL commands-though obviously
                  subject to timing windows- can be used to rename
                  all the versions of a file back down to a contiguous
                  sequence of versions starting at 1:

                  $ RENAME file.typ;*   RENAME.TMP;
                  $ RENAME RENAME.TMP;* file.typ;

                  The key to the success of this RENAME sequence is the
                  specification of (only) the trailing semicolon on the
                  second parameter of each of the RENAME commands.

                  You may also see the numbers of files reduced with
                  DELETE commands, with multiple directories, or with
                  PURGE commands such as the following examples:

                  $ PURGE/BEFORE="-2-"
                  $ PURGE/BEFORE="TODAY-2-"
                  $ PURGE/KEEP=10"

                  You can use DFU (Freeware) to quickly and efficiently
                  scan for all files with large(r) version numbers:

                  DFU SEARCH/VERSION=MINIMUM=nnnn

                  If you are creating or supporting an application,
                  selecting temporary or log file filenames from among
                  a set of filenames-selecting filenames based on time,
                  on process id, on the day of week, week number, or
                  month, on the f$unique lexical (V7.3-2 and later), etc-
                  is often useful, as this approach more easily permits
                  on-line adjustments to the highest file versions and
                  easily permits on-line version compression using

                  5-66







                  System Management Information




                  techniques shown above. With differing filenames,
                  you are less likely to encounter errors resulting
                  from files that are currently locked. You can also
                  detect the impending version number limit within the
                  application, and can clean up older versions and roll
                  the next file version creation to ;1 or such.

                  Also see Section 9.4.

         __________________________________________________________
         5.45  Host-based Volume Shadowing and RAID?

                  Host-based Volume Shadowing (HBVS) is Disk Mirroring is
                  RAID Level 1.

                  HBVS is capable of shadowing devices of different
                  geometries, of different block counts (with
                  dissimilar device shadowing; allowing for mixtures
                  of hardware) and-with dynamic volume expansion-of
                  growing volumes on the fly, and HBVS is capable of
                  shadowing/mirroring/raid-1 operations across cluster
                  configurations up to the full span-please see the
                  Cluster SPD for the current supported span; the
                  supported span limit is currently multiple hundreds
                  of kilometers-of a cluster. HBVS can be layered onto
                  controller (hardware) RAID, as well.

                  For information on host-based striping, please see the
                  StorageWorks RAID product.















                                                                     5-67












                  _______________________________________________________

         6        Information on Mail



         __________________________________________________________
         6.1  MAIL keeps saying I have new messages, but I don't. What do
              I do?

                  if you see the %MAIL-W-NONEWMAIL, no new messages error
                  reported when MAIL indicates you have messages, then
                  the NEWMAIL count has become skewed from reality.

                  The count of new mail messages is kept separately
                  from your mail folder, and is stored in VMSMAIL_
                  PROFILE.DATA. It sometimes happens that this count
                  differs from what is stored in your mail folder. If
                  this arises, invoke MAIL and repeatedly enter the
                  READ/NEW command (or press the keypad hyphen key on
                  an LK-compatible keyboard) until you see no new mail
                  messages. Then enter the command one more time. This
                  will resynchronize the counters.

                  If you are operating in a cluster and find your mail
                  counts inconsistent across cluster members, your
                  customer is likely missing a definition of the VMSMAIL_
                  PROFILE logical name-and is probably also missing
                  definitions of other logical names associated with
                  other shared files-or has one or more inconsistent
                  definitions of this and likely of other logical names.

                  For details on the configuration data files that
                  must be shared within a cluster, please see
                  SYS$STARTUP:SYLOGICALS.TEMPLATE on V7.2 and later.

         __________________________________________________________
         6.2  How do I send or read attachments in VMS MAIL?

                  Is there any way to send or read mail with files as
                  attachments from VMS?



                                                                      6-1







                  Information on Mail




                  Not directly with the OpenVMS MAIL facility, but there
                  are several other options:

                  o  Install PINE, available commercially from Innosoft
                     or free from Andy Harper. With PINE you can both
                     send and receive MIME messages, if you have the
                     appropriate viewers available.

                    o  http://www.process.com/

                    o  http://www.agh.cc.kcl.ac.uk/files/vms/pine-vms/

                    o  ftp://ftp2.kcl.ac.uk/pub/vms/pine-vms/

                  o  If you are working from an X Windows display, you
                     can use the OpenVMS version of Netscape Navigator or
                     Mozilla. The mail download protocol chosen to access
                     the mail server from the Navigator or Mozilla mail
                     client can be POP or IMAP, with the former causing
                     messages to be downloaded while the latter permits
                     messages to be retained on the mail server. Most
                     folks prefer IMAP for this reason.

                  o  MPACK/MUNPACK. To send a MIME mail, construct the
                     message with attachments manually using MPACK. You
                     cannot send the resulting file directly through MAIL
                     because an extra blank header line will be inserted
                     between your message and the OpenVMS MAIL headers,
                     which will cause the message to appear as plain text
                     in most mail programs. Some TCP/IP stacks provide
                     a work around for this problem, and if that doesn't
                     work, you should generally be able to force the
                     message directly into the SMTP port of your mail
                     machine. Examples of both methods are in:

                    o  http://saf.bio.caltech.edu/pub/software/openvms/mmail.com

                     To read a MIME mail message, open it in MAIL,
                     extract it to a file, then use MUNPACK to break
                     out and decode the attachments.

                     MPACK/MUNPACK tools are also available on OpenVMS
                     Freeware V5.0.

                  o  With OpenVMS V7.2 and later, use the MIME tool
                     supplied with OpenVMS.

                  6-2







                  Information on Mail



         __________________________________________________________
         6.3  How can I block SMTP mail relay spam?

                  Use the anti-spam capabilities present in the TCP/IP
                  Services V5.1 and later SMTP servers.

                  Use a firewall.

                  On earlier TCP/IP Services releases, some simple DCL
                  can reportedly prevent relay SMTP spam. Use the UCX
                  command SHOW SERVICE SMTP/FULL to find the directory
                  containing the UCX$SMTP_RECV_STARTUP.COM file, and
                  insert the following DCL:

         $       !
         $       ! Block spam.
         $       !
         $       MY_ADDRESS_LONG[0,32]=F$INTEGER(F$TRNLNM("SYS$REM_NODE")-"::")
         $       MY_ADDRESS=F$FAO("!UB.!UB.!UB.!UB",F$CVUI(0,8,MY_ADDRESS_LONG),-
                  F$CVUI(8,8,MY_ADDRESS_LONG),F$CVUI(16,8,MY_ADDRESS_LONG),-
                  F$CVUI(24,8,MY_ADDRESS_LONG))'"
         $       MY_ADDRESS_REVERSE=F$FAO("!UB.!UB.!UB.!UB",-
                  F$CVUI(24,8,MY_ADDRESS_LONG),F$CVUI(16,8,MY_ADDRESS_LONG),-
                  F$CVUI(8,8,MY_ADDRESS_LONG),F$CVUI(0,8,MY_ADDRESS_LONG))'"
         $       WRITE SYS$OUTPUT F$TIME()+" "+F$TRNLNM("SYS$REM_NODE")+MY_ADDRESS
         $       UCX SHOW HOST 'MY_ADDRESS_REVERSE'.INPUTS.ORBS.ORG
         $       IF $STATUS.EQ.1
         $       THEN
         $         WRITE SYS$OUTPUT "SPAM from relay rejected"
         $         EXIT
         $       ENDIF
         $       UCX SHOW HOST 'MY_ADDRESS_REVERSE'.SPAMSOURCES.ORBS.ORG
         $       IF $STATUS.EQ.1
         $       THEN
         $         WRITE SYS$OUTPUT "SPAM source relay rejected"
         $         EXIT
         $       ENDIF
         $       !
         $       ! Run receiver.
         $       !
         $       run sys$system:ucx$smtp_receiver.exe
         $       goto exit



                                                                      6-3












                  _______________________________________________________

         7        Information on Utilities



         __________________________________________________________
         7.1  How do I play an audio CD on my workstation?

                  If you've installed the DECwindows examples, you'll
                  find DECW$CDPLAYER.C, .DAT, .EXE, .UIL, and .UID.
                  Copy the .UID and .DAT files to DECW$USER_DEFAULTS:
                  (typically SYS$LOGIN:), define the logical name
                  DECW$CD_PLAYER to be the device name of your CD-ROM
                  drive (eg. DKA400:), give yourself PHY_IO and DIAGNOSE
                  privileges, and run the .EXE. (These privileges are
                  required, as the access to the CD-related extensions
                  will require the use of the privilege-protected IO$_
                  DIAGNOSE I/O function code.) You can also install
                  the image with these privileges. See the source for
                  additional details - note that the comments regarding
                  the need for SYSGEN CONNECT are no longer applicable
                  (at least as of VMS V5.5-2).

                  There's also SYS$EXAMPLES:CDROM_AUDIO.C and .EXE,
                  a non-Motif program, available on OpenVMS VAX, and
                  DECW$EXAMPLES:DECW$CDPLAYER.* on OpenVMS VAX and
                  OpenVMS Alpha.

                  The standard OpenVMS ATA (IDE) SYS$DQDRIVER device
                  driver does not support the necessary does not
                  support the necessary IO$_DIAGNOSE function code
                  that is required for access to audio CD media
                  commands (on OpenVMS versions prior to V7.3), but
                  an updated SYS$DQDRIVER device driver (source
                  code and all) with this capability and with the
                  source code of an updated DECW$CDPLAYER CD audio
                  player is available on the OpenVMS Freeware website
                  (www.hp.com/go/openvms/freeware/, look for the
                  directory /dqdriver/), and these updates are also
                  included on OpenVMS Freeware V5.0, and OpenVMS ECO
                  kits containing newer versions of the driver are
                  available. Freeware V6.0 has a version of DQDRIVER
                  that is newer than that of the OpenVMS Alpha V7.3-2

                                                                      7-1







                  Information on Utilities




                  release, with additional capabilities and with improved
                  error diagnostics.

                  OpenVMS Alpha V7.3 and later include a version of
                  SYS$DQDRIVER with the necessary IO$_DIAGNOSE support.

         __________________________________________________________
         7.2  How do I access a Microsoft Windows floppy disk from
              OpenVMS?

                  The HP Advanced Server (formerly known as PATHWORKS)
                  for OpenVMS product includes an unsupported and
                  undocumented utility called PCDISK, and this tool can
                  read and write various Microsoft MS-DOS and Microsoft
                  Windows FAT-format diskettes, and can usually access
                  FAT-format volumes written by other operating systems.

                  ProGIS in Germany sells a product called VMove which
                  supports DOS files on many different device types. For
                  more information, send mail to [email protected].

                  Engineering Software has a product called VAKSAT
                  which will read, write, and erase files on MS-DOS FAT
                  diskettes. Available for both VAX and Alpha. Contact
                  [email protected] for more information.

                  MadGoat PC Exchange (PCX) is a utility for copying
                  files to and from MS-DOS and Microsoft Windows (FAT)
                  format diskettes under OpenVMS, using an RX23 (3.5"),
                  RX26 (3.5"), or RX33 (5.25") diskette drive. For 3.5"
                  diskettes, high-density disks can be read or written;
                  double-density disks are read-only. Only high-density
                  disks are supported on the RX33.

                  o  http://www.madgoat.com/

                  The Freeware package WINFX is available on Freeware
                  V6.0, and can read the FAT volume structure.

                  o  http://www.hp.com/go/openvms/freeware/




                  7-2







                  Information on Utilities



         __________________________________________________________
         7.3  How do I play sound files on an AlphaStation? DECsound
              doesn't work.

                  Various of the more recent AlphaStation systems use
                  a different sound board (Microsoft Sound System) than
                  the earlier DEC 3000 series systems, and DECsound,
                  as supplied by DECwindows Motif, doesn't support
                  this board nor this interface. HP offers an optional
                  product, Multimedia Services (MMOV) for OpenVMS:

                  o  http://h18000.www1.hp.com/info/spd/

                     OpenVMS typically uses SPD 25.01.xx, SPD 41.87.xx,
                     and SPD 82.35.xx.

                  which provides a replacement for DECsound for this card
                  as well as many other features (an AVI and MPEG player,
                  video capture support, etc.)

                  Ensoniq sound support is also available.

         __________________________________________________________
         7.4  How do I read IBM EBCDIC tapes on OpenVMS?

                  Most (all?) IBM EBCDIC-based systems can read and write
                  ANSI-labeled ASCII magtapes. Fixed-length records
                  (MOUNT /FOREIGN /BLOCKSIZE=512 /RECORDSIZE=512, for
                  one-block records) and the DCL COPY command can be
                  used to transfer fixed-record-size text files out onto
                  tape media, or to read from fixed-record tape media.
                  Please consult the IBM documentation for the details
                  and command syntax needed when reading and writing ANSI
                  media using IBM JCL or other applicable IBM command
                  language.

                  There exists various freeware around (TAPECOPY, ETAPE,
                  TCOPY, MTEXCH) that can read and write EBCDIC tapes.
                  Visit the Encompasserve (DECUS) website software
                  archives search engine and search for "EBCDIC" for
                  details.

                  o  http://www.encompassus.org

                  OpenVMS does not include an integrated tool for
                  EBCDIC tape processing, but does provide a character
                  conversion API useful within application programs.

                                                                      7-3







                  Information on Utilities




                  One source for ETAPE is:

                  o  http://www.ualr.edu/ftp/vms/ETAPE_SRC/

                  The OpenVMS Freeware V5.0 distribution included this
                  ETAPE tool, as well.

         __________________________________________________________
         7.5  How can I patch an OpenVMS Alpha image?

                  Using the OpenVMS Freeware tool ZAP:

                  o  Look for the RMS_TOOLS directory on Freeware V5.0:
                     http://www.hp.com/go/openvms/freeware/

                  tell ZAP to read a block (bucket) of information
                  based on the virtual block number (VBN), using X for
                  hexadecimal. Dump yourself into the OpenVMS debugger
                  with R2 pointing into the buffer, EXAMINE/INSTRUCTION
                  as needed, alter the buffer as required, GO to get out
                  of the debugger and back into ZAP, and use the ZAP W
                  command to write the updated block.






















                  7-4












                  _______________________________________________________

         8        DCL Details



         __________________________________________________________
         8.1  DCL Symbols and OpenVMS Logical Names?

                  DCL symbols are programming-style variables implemented
                  within the DCL command interpreter, and these are
                  used both for programming and to provide command
                  verb synonyms. Symbols are local to the command
                  interpreter operating within a particular process,
                  and are not shared. Lists of symbols can be copied into
                  subprocesses during a subprocess creation operation,
                  but these symbols are neither copied back into the
                  parent process when the subprocess exits, nor are
                  symbols ever shared across processes.

                  Symbols can be specified in and utilized in basic
                  mathematical operations, and bit-level operations are
                  available with the f$cvsi and f$cvui bit extraction
                  lexical functions, and with the square-brackets
                  notation for bit insertion (see Section 8.13 for an
                  example), and with bitwise operators. Symbols are of
                  two basic types, STRING and INTEGER, and these (or an
                  undefined symbol) can be differentiated with the f$type
                  lexical function. DCL symbols can also be used as a
                  mechanism to abbreviate a DCL command verb, or an easy
                  way to invoke a DCL command procedure.

                  Symbols can have local or global scope within a
                  process, and scope is affected by nested procedure
                  calls and DCL constructs such as CALL and SET SCOPE,
                  but such discussions are beyond the scope of this
                  section.

                  OpenVMS Logical names can store device names, device
                  and directory specifications, rooted or searchlist
                  specifications, and full filenames. Logical names can
                  also store arbitrary data, but there are no native
                  mathematical or bitwise operators available. Analogous
                  to DCL symbols, process-local logical names can be
                  copied into subprocesses during a subprocess creation

                                                                      8-1







                  DCL Details




                  operation, but these process-local logical names are
                  neither copied back into the parent process when the
                  subprocess exits, nor are these logical names ever
                  shared.

                  Logical names are implemented deep within the OpenVMS
                  executive, and are organized into logical name tables.
                  Logical names can be stored in tables private to a
                  process( LNM$PROCESS, the process-local logical name
                  table) , that can be shared among processes in the same
                  job tree ( LNM$JOB, the job logical name table) or in
                  logical name tables that are shared among larger groups
                  of processes (eg: LNM$GROUP, the UIC group logical
                  name table and LNM$SYSTEM, the system-wide logical name
                  table). Logical names are centrally intended to provide
                  various I/O-related capabilities, including device
                  independence and configuration customization-correctly-
                  written application programs can use logical names to
                  avoid embedding specific device or device and directory
                  specifications, and to allow filename and configuration
                  customizations.

                  One of the most powerful capabilities of logical names
                  beyond the device independence provided involves the
                  defaulting capabilities; you can use RMS parsing
                  (directly, or with mechanisms such as the f$parse
                  lexical function) to provide a filename and a default
                  filename. To provide the mechanism that allows SYSUAF
                  to be located in an arbitrary position or even an
                  arbitrary filename, a construct similar to the
                  following is used:

                  $ UAF = F$PARSE("SYSUAF","SYS$SYSTEM:.DAT")

                  This design allows the logical name SYSUAF to be
                  optionally defined, and - when present-to specify the
                  particular location and name of the file. Portions
                  of the full file specification that are omitted are
                  retrieved using the default translation of SYS$SYSTEM:
                  and the file type of .DAT.

                  Logical names also have assigned processor modes, as
                  some translations must be trustworthy. In the example
                  above, only trusted and privileged system users should
                  be able to redirect the SYSUAF authorization database,

                  8-2







                  DCL Details




                  so any definition of the SYSUAF logical name must be
                  made in EXECUTIVE mode in a trusted logical name table.

                  As for common OpenVMS terminology, logical names are
                  "defined" and the associated processing is refered to
                  as "translation", while symbols are "equated" and the
                  associated processing is refered to as "substitution".
                  "Lexical functions" are processing routines built
                  into DCL, and typically prefixed with f$. Many of the
                  lexical functions are built upon correspondingly-named
                  system services, though not all.

                  Symbol substitution occurs only when the DCL command
                  interpreter is reading and processing the command
                  input; for information on DCL symbol substitution, see
                  Section 8.10. For program access, see the RTL routines
                  lib$set_symbol and lib$get_symbol.)

                  For information on logical name translation, please see
                  f$trnlnm lexical function and the DCL commands DEFINE
                  and DEASSIGN, as well as underlying system services
                  such as sys$trnlnm. Logical name translation occurs
                  when requested, or as the file or I/O operation is
                  started.

                  Please see the OpenVMS User's Guide in the OpenVMS
                  documentation set for a far more detailed description
                  of these constructs.

                  For related materials, please see Section 8.10 and
                  Section 8.11.

         __________________________________________________________
         8.2  How do I run a program with arguments?

                  The RUN command does not accept arguments. To pass
                  arguments to a program, you must use what is called
                  a "foreign command", and either an explicit command
                  as shown here, or an automatic foreign command. For
                  example:

                  $ unzip :== $disk:[dir]unzip.exe
                  $ unzip -?

                                                                      8-3







                  DCL Details




                  The leading $ in the equivilence name for the symbol
                  definition is what makes the DCL symbol a foreign
                  command. If the device and directory are omitted,
                  SYS$SYSTEM: is assumed.

                  Under OpenVMS V6.2 and later, DCL supports automatic
                  foreign command definition via the logical name
                  DCL$PATH. An example of a definition of this logical
                  name is:

                  $ DEFINE DCL$PATH SYS$DISK:[],ddcu:[mytooldir],SYS$SYSTEM:

                  DCL will first look for a command in the DCL command
                  table, and if no match is found and if DCL$PATH is
                  defined, it will then look for command procedures and
                  executable images with filenames matching the command
                  specified, in the directories specified via DCL$PATH.
                  The first match found is invoked, and under OpenVMS,
                  the DCL$PATH support will cause a command procedure to
                  be activated in preference to an executable image.

                  For more information on foreign commands or on
                  automatic foreign command support, see the OpenVMS
                  User's Manual.

                  See also Section 10.3.

                  If you want to create a detached process that takes
                  arguments from a command line, it must be run under the
                  control of a command line interpreter (CLI) (typically
                  DCL). This is done by placing the command line in a
                  file, specifying SYS$SYSTEM:LOGINOUT.EXE as the image
                  to run and the command file as the input. For example:

                  $ OPEN/WRITE CMD TEMP_INPUT.COM
                  $ WRITE CMD "$ MYCOMMAND arguments"
                  $ CLOSE CMD
                  $ RUN/DETACHED SYS$SYSTEM:LOGINOUT /INPUT=TEMP_INPUT.COM

                  Various OpenVMS library calls (such as lib$spawn(),
                  cli$dcl_parse(),  and the C library system() call)
                  require access to a command line interpreter such as
                  DCL to perform requested actions, and will not operate
                  if a CLI is not available.

                  8-4







                  DCL Details




                  When a CLI is not available, these calls typically
                  return the error status SS$_NOCLI. And as mentioned
                  above, invoke the image LOGINOUT to cause a CLI (such
                  as DCL) to be mapped into and made available in the
                  context of the target process.

                  For examples of how TCP/IP Services sets up its foreign
                  commands (which includes tools such as uuencode
                  and uudecode), please see the DCL command procedure
                  SYS$STARTUP:TCPIP$DEFINE_COMMANDS.COM.

                  Also see Section 8.12.

         __________________________________________________________
         8.3  How can I clear the screen in DCL?

                  The simplest way is the TYPE/PAGE NLA0: command.

                  You can set up a symbol to clear the screen in your
                  LOGIN.COM:

                  $ CLS :== TYPE/PAGE NLA0:

         __________________________________________________________
         8.4  Using REPLY/LOG from DCL? Disabling Console OPCOMs?

                  Your terminal must be enabled as an operator terminal
                  before the REPLY/LOG command can be used, but a DCL
                  procedure (batch command file, system startup, etc)
                  does not have an associated terminal. To make this
                  work, use the following sequence to enable the OPA0:
                  console as the operator terminal, then the REPLY/LOG
                  command will be accepted:

                  $ DEFINE/USER SYS$COMMAND _OPA0:
                  $ REPLY/LOG
                  $ DEFINE/USER SYS$COMMAND _OPA0:
                  $ REPLY/ENABLE

                  To disable the system console terminal (OPA0:) as an
                  operator terminal, use the following command:

                  $ DEFINE/USER SYS$COMMAND _OPA0:
                  $ REPLY/DISABLE

                                                                      8-5







                  DCL Details




                  Also see SYLOGICALS.COM (and SYLOGICALS.TEMPLATE) for
                  information on configuring the behaviour of OPCOM,
                  including the (default) use of the system console
                  (OPA0:) as an operator terminial and the specific
                  contents and behaviour of the system operator log file
                  OPERATOR.LOG.

         __________________________________________________________
         8.5  How do I generate a random number in DCL?

                  With V7.3-2 and later, f$unique can be useful
                  here. Alternatively, here is a pseudo-random number
                  generator, just do a GOSUB RAND and the global symbol
                  RANDOM will contain a randomly generated number. You
                  can feed the generator a ceiling value (__CEIL)  or a
                  new seed (__SEED).

         $! RAND - returns a positive random number ("RANDOM") between 0 and
         $!        __CEIL - 1.
         $! sharris-at-sdsdmvax.fb3.noaa.gov
         $ RAND:
         $
         $ IF F$TYPE(__SEED) .EQS. ""
         $ THEN
         $     ! seed the random number generator, ...
         $     __NOW = F$CVTIME()
         $     __HOUR = 'F$EXTRACT(11,2,__NOW)'
         $     __MINUTE = 'F$EXTRACT(14,2,__NOW)'
         $     __SECOND = 'F$EXTRACT(17,2,__NOW)'
         $     __TICK = 'F$EXTRACT(20,2,__NOW)'
         $
         $     __SEED == __TICK + (100 * __SECOND) + (6000 * __MINUTE) + -
                  (360000 * __HOUR)
         $     ! the generator tends to do better with a large, odd seed, ...
         $     __SEED == (__SEED .OR. 1)
         $     ! clean up, ...
         $     DELETEX/SYMBOL __NOW
         $     DELETEX/SYMBOL __HOUR
         $     DELETEX/SYMBOL __MINUTE
         $     DELETEX/SYMBOL __SECOND
         $     DELETEX/SYMBOL __TICK
         $ ENDIF
         $
         $ IF F$TYPE(__CEIL) .EQS. "" THEN __CEIL = %X3FFFFFFF

                  8-6







                  DCL Details




         $
         $ __SEED == __SEED * 69069 + 1
         $
         $ RANDOM == (__SEED.AND.%X3FFFFFFF)/(%X40000000/__CEIL)
         $
         $ RETURN

         __________________________________________________________
         8.6  What does the MCR command do?

                  The MCR is an artifact of RSX compatibility mode, the
                  operating system from which OpenVMS is descended. MCR
                  is the Monitor Console Routine, and the command is
                  intended to activate RSX compatibility mode utilities.
                  When used on OpenVMS, the command is most commonly
                  used to run the specified image and-because the tool
                  detects the image is not a compatibility-mode image-
                  it acts as a form of RUN command with the default
                  file specification of SYS$SYSTEM:.EXE. MCR passes any
                  (optional) command line arguments in a fashion similar
                  to a foreign command. In other words:

                  $ MCR FOO BAR

                  is equivalent to:

                   $ FOO :== $FOO
                   $ FOO BAR

                  MCR is not documented. Use of a foreign command or the
                  DCL$PATH mechanism is preferred. For details on this,
                  see Section 8.2.

         __________________________________________________________
         8.7  How do I change the OpenVMS system prompt?

                  You can use the SET PROMPT command for this purpose.
                  SET PROMPT sets the DCL prompt to the specified string.

                  When you want to display variable information, you
                  will need to establish a tie-in that provides the
                  information to the SET PROMPT command as required.

                  If you wish to display the default directory for
                  instance, you will have to establish a tie between
                  the SET DEFAULT command and the SET PROMPT commands, as
                  there is no direct way to get the default directory as

                                                                      8-7







                  DCL Details




                  the DCL prompt. You can easily acquire or create a set
                  of DCL command procedures that perform the SET DEFAULT
                  and SET PROMPT for you. These DCL command procedures
                  often use a command such as:

                  $ set prompt='f$environment("default")'

                  More advanced users could implement a system service or
                  other intercept, and use these tools to intercept the
                  directory change and reset the prompt accordingly.
                  (This approach likely involves some kernel-mode
                  programming, and requires write access to various
                  undocumented OpenVMS data structures.)

                  There are related tools available from various sources,
                  including the following web sites:

                  o  ftp://ftp.hhs.dk/pub/vms/setpmt/

                  o  ftp://ftp.tmesis.com/sys_service_hook.src

                  o  James F. Duff has also made available a Macro32 tool
                     known as TIME_PROMPT, a tool that sets the prompt to
                     the current system time.

                  o  Many folks have contributed DCL procedures to
                     perform this task. Visit the newsgroup archives
                     for information and examples.

         __________________________________________________________
         8.8  Can I do DECnet task-to-task communication with DCL?

                  Yes, you can do this with DCL.

                  The OpenVMS DECnet documentation shows various simple
                  examples using the task object and the TYPE command to
                  trigger the execution of a DCL command procedure on a
                  remote node. An example DCL command procedure that is
                  rather more advanced than using the TYPE command as a
                  trigger is included in the Ask The Wizard area:

                  o  http://www.hp.com/go/openvms/wizard/

                  For additional information on the OpenVMS Ask The
                  Wizard (ATW) area and for a pointer to the available
                  ATW Wizard.zip archive, please see Section 3.8.

                  8-8


---------------------------- #include <rtfaq.h> -----------------------------
   For additional, please see the OpenVMS FAQ -- www.hp.com/go/openvms/faq
--------------------------- pure personal opinion ---------------------------
       Hoff (Stephen) Hoffman   OpenVMS Engineering   hoff[at]hp.com