Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: hoffman@xdelta.zko.dec.nospam (Hoff Hoffman)
Subject: OpenVMS Frequently Asked Questions (FAQ), Part 4/9
Date: Thu, 03 Jul 2003 17:13:08 GMT	[thread overview]
Message-ID: <EuZMa.3894$bl3.3439@news.cpqcorp.net> (raw)
In-Reply-To: KtZMa.3893$bl3.2093@news.cpqcorp.net




 





                   System Management Information



          __________________________________________________________
          5.24  INITIALIZE ACCVIO and ANSI tape label support?

                   A change was made (back in 1988) to (as it was then
                   known) VAX/VMS V5.1-1 that added support for the then-
                   new ANSI X3.27-1987 magnetic tape label standard. Prior
                   to the ANSI X3.27-1987 standard, the date field in the
                   ANSI HDR1 record permits dates only as far as the end
                   of Year 1999. With ANSI X3.27-1987, dates through Year
                   1999 and dates from Years 2000 to 2099 are permitted.

                   Versions of INIT.EXE and MTAACP.EXE from VAX/VMS
                   releases prior to V5.1-1 will potentially have problems
                   properly processing ANSI magnetic tapes when Y2K and
                   later dates are involved-the DCL INITIALIZE command is
                   known to encounter access violation (ACCVIO) errors.

                   The available solutions include upgrades, or setting
                   the date back. Direct initialization of the tape with
                   the new headers (via $qio) is also clearly possible,
                   though the limitation within the old MTAACP.EXE magtape
                   ACP image is not nearly so easy to bypass.

          __________________________________________________________
          5.25  How do I recover from INSVIRMEM errors?

                   Prior to OpenVMS Alpha V7.0 and on all OpenVMS VAX
                   releases, VIRTUALPAGECNT and PGFLQUOTA limit the amount
                   of virtual address space that is available to each
                   process.

                   Further limiting the amount of address space is the
                   size of system space (S0 and S1 space). On OpenVMS
                   Alpha versions prior to V7.0 and on all OpenVMS VAX
                   releases, VIRTUALPAGECNT and MAXPROCESSCNT together
                   determine the size of the page table data structures
                   that occupy large tracts of system space. When no
                   system virtual address space is available for the stuff
                   that needs it-this includes the page tables, non-paged
                   pool, and various other structures-then the values of
                   VIRTUALPAGECNT and MAXPROCESSCNT cannot be increased.

                   In OpenVMS Alpha V7.0 and later, the page table data
                   structures have been moved out of S0 and S1 space and
                   into page table space. In OpenVMS Alpha V7.2 and later,
                   certain large data structures found in non-paged pool
                   (eg: lock management structures) have been moved into

                                                                      5-33
\f
 





                   System Management Information




                   64-bit space, thus freeing up room in non-paged pool
                   and in S0 and S1 space (where non-paged pool resides)
                   while also permitting much larger data structures.

          __________________________________________________________
          5.26  How can I prevent a serial terminal line from initiating a
                login?

                   In SYSTARTUP_VMS.COM, issue the command:

                   $ SET TERMINAL/NOTYPEAHEAD/PERMANENT ddcu:

                   This will prevent any unsolicited terminal input on
                   ddcu:, and this unsolicited input is what triggers
                   JOB_CONTROL to start up LOGINOUT on the terminal. Once
                   LOGINOUT starts up on the serial line, you can see
                   interesting behaviour (eg: audits, process creations,
                   etc) as LOGINOUT tries to "chat" with whatever device
                   is hooked onto the remote end of the serial terminal
                   line.

          __________________________________________________________
          5.27  How does PCSI use the image BUILD_IDENT field?

                   The (undocumented) build ident field in an OpenVMS
                   Alpha image header is 16 bytes long, and is used as
                   a counted string of 0-15 characters (ie, as an .ASCIC
                   string, a string with the character count in byte 0)
                   and was originally introduced to provide information
                   for use by VMSINSTAL patch kits to determine whether an
                   image should be replaced or not.

                   Starting with OpenVMS Alpha V7.1-2, OpenVMS Engineering
                   uses the PCSI utility to package and install ECO kits
                   for OpenVMS. PCSI uses the generation attribute (a
                   32-bit unsigned integer) specified for files in the
                   product description file (PDF) of a PCSI kit as the
                   basis for performing file conflict detection and
                   resolution. When a product is installed, PCSI modifies
                   the build ident field of Alpha image headers to store
                   an encoded form of the generation number. It also looks
                   at the build ident field of previously installed images
                   to obtain the generation information for those files as
                   input to the file conflict processing algorithm. (Only
                   images have this field, obviously.)

                   5-34
\f
 





                   System Management Information




                   PCSI interprets the build ident field of a previously
                   installed image as follows:

                   o  if the string length is 15, the 5th character is
                      a hyphen, and the last ten characters are a ten
                      digit number with leading zeros, then the last ten
                      characters are treated as a valid generation number.

                   o  for V7.1-2 through V7.2-1, inclusive, if the above
                      test fails, the information is obtained from the
                      PCSI product database.

                   o  in releases after V7.2-1 and with current PCSI ECO
                      kits, if the above test fails, an invalid generation
                      number is treated as 0000000000 so that the ECO kit
                      will simply replace the image rather than assuming
                      the PCSI database is in error.

                   So, what will you see in the image identification
                   displayed via the ANALYZE/IMAGE command?

                   For an image that has been built as part of an OpenVMS
                   Engineering system build, you will generally see a
                   build ID string in the format "X6TE-SSB-0000"-X6TE is
                   the build number for the OpenVMS Alpha V7.2-1 release.
                   This id format is used within the OpenVMS system build,
                   and can generally only be seen associated with images
                   that have not yet been processed via PCSI.

                   During the installation of V7.2-1, PCSI will modify
                   the image header to have a build ident string of
                   "X6TE-0050120000". During installation of an ECO
                   kit containing this image with a generation number
                   of 50130052, for example, PCSI would determine that
                   50130052 is greater than 50120000, and will replace the
                   existing image on the target disk with the version of
                   the image included in the ECO kit.







                                                                      5-35
\f
 





                   System Management Information



          __________________________________________________________
          5.28  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.

                   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-36
\f
 





                   System Management Information



          __________________________________________________________
          5.29  What file checksum tools are available for OpenVMS?

                   The undocumented DCL command CHECKSUM is the usual
                   means, and provides a rather simple-minded checksum
                   suitable to detect basic file corruptions. For
                   information and an OpenVMS version of the MD5 checksum
                   tool, see:

                   o  http://www.support.compaq.com/svctools/md5-
                      instructions.html

                   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.16 for information on acquiring OpenVMS
                   ECO (patch) kits.

          __________________________________________________________
          5.30  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.31  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-37
\f
 





                   System Management Information



          __________________________________________________________
          5.32  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

                   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.33  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.)

                   5-38
\f
 





                   System Management Information




                   o  rename each extracted setup module to a
                      corresponding:

                      LPS$$UNRECOGNIZED_*

                   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.14.

                                                                      5-39
\f
 





                   System Management Information



          __________________________________________________________
          5.34  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.35  What software is needed for Postscript printers?

                   The NorthLake PrintKit (http://www.nls.com/)
                   and DECprint Supervisor (DCPS;
                   http://www.openvms.compaq.com/openvms/Print/print_
                   sw_prods.html) are common choices for support of
                   Postscript printers on OpenVMS.

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

                   Also please see Section 15.2.2 and Section 15.2.3.

          __________________________________________________________
          5.36  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 PRODUCE <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.

                   5-40
\f
 





                   System Management Information




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

                   The above information also applies to PCSI PARTIAL
                   kits.

          __________________________________________________________
          5.37  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.38  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.

                                                                      5-41
\f
 





                   System Management Information




                   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.)

                   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 is no license check failure does NOT
                   indicate that the particular product or operation is
                   permissible per the license.

                   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.5 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.5 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-42
\f
 





                   System Management Information



          __________________________________________________________
          5.39  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.40  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-43
\f
 





                   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-44
\f
 





                   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 $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 expected 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.5 and/or the OpenVMS documentation set.

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

          __________________________________________________________
          5.41__Please_help_me_with_the OpenVMS BACKUP utility?

          5.41.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-45
\f
 





                   System Management Information



          _____________________________
          5.41.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.41.1.

          _____________________________
          5.41.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.41.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 V6.2 release notes for additional
                   details.

                   5-46
\f
 





                   System Management Information



          _____________________________
          5.41.3  Why is BACKUP not working as expected?

                   First, PLEASE READ THE BACKUP MANUAL.

                   Second, PLEASE GET THE CURRENT BACKUP ECO KIT.

                   Third, PLEASE SET THE PROCESS QUOTAS PER THE
                   DOCUMENTATION.

                   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.

                   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.

                                                                      5-47
\f
 





                   System Management Information




                   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.41.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.


                   5-48
\f
 





                   System Management Information




                   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

                   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-49
\f
 





                   System Management Information



          _____________________________
          5.41.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
                   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-50
\f
 





                   System Management Information



          _____________________________
          5.41.6  How to perform a 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. While initially easy, characteristics of
                   the media and of the device error recovery and bad
                   block handling can make this effort far more difficult
                   than it might initially appear.

                   Security and sensitivity of the data is central to this
                   discussion, as is the value of the storage hardware
                   involved-with data of greater value than the disks
                   involved, physical destruction of the platters may
                   be the most expedient, economical, and appropriate
                   approach.

                   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 topics such as
                   (841), (3926), (4286), (4598), and (7320).

          _____________________________
          5.41.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.

                   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

                                                                      5-51
\f
 





                   System Management Information




                   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-52
\f
 










                   _______________________________________________________

          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
\f
 





                   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 X11 server, 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://seqaxp.bio.caltech.edu/pub/SOFTWARE/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
\f
 





                   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
\f
 










                   _______________________________________________________

          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.openvms.compaq.com/freeware/dqdriver/), and these
                   updates are also included on OpenVMS Freeware V5.0,
                   and OpenVMS ECO kits containing newer versions of the
                   driver are available.

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

                                                                       7-1
\f
 





                   Information on Utilities



          __________________________________________________________
          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.

                   ProGIS in Germany sells a product called VMove which
                   supports DOS files on many different device types. For
                   more information, send mail to info@progis.de.

                   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
                   ed@cityscape.co.uk 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/

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

                   The new 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. HP offers
                   an optional product, Multimedia Services for OpenVMS:

                   o  http://www.compaq.com/info/spd/
                      OpenVMS typically uses SPD 25.01.xx and/or SPD
                      41.87.xx.

                   which provides a replacement 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-2
\f
 





                   Information on Utilities



          __________________________________________________________
          7.4  Why is DECmigrate not working with Fortran?

                   %OTS-F-INDATCOR internal data corrupted in Run-
          time Library

                   This error can arise with Fortran programs if you are
                   running a recent version of OpenVMS Alpha, and are
                   using DECmigrate to translate Fortran applications. The
                   DECmigrate Run-Time Library attempts to support mixed
                   translated-native I/O to the same unit by sharing the
                   native Fortran RTL's internal data structures, and in
                   OpenVMS 7.2 these structures changed and the translated
                   RTL was not updated accordingly.

                   You can copy DEC$FORRTL.EXE from OpenVMS 7.1, copying
                   it to some spare directory, and then defining the
                   logical name DEC$FORRTL to point to it before running
                   your translated application. Or rebuilding the
                   application to use the available native Fortran
                   compiler. Or you can apply the current Fortran RTL
                   kit, which has a fix for this.

                   See Section 13.11.

          __________________________________________________________
          7.5  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 (via http://www.decus.org/),
                   and search for "EBCDIC" for details.

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

                                                                       7-3
\f
 





                   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.6  How can I patch an OpenVMS Alpha image?

                   Using the OpenVMS Freeware tool ZAP:

                   o  www.openvms.compaq.com/freeware/freeware50/rms_
                      tools/

                   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
\f
 










                   _______________________________________________________

          8        DCL Details



          __________________________________________________________
          8.1  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". For example:

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

                   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

                                                                       8-1
\f
 





                   DCL Details




                   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.

                   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.10.

          __________________________________________________________
          8.2  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.3  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:

                   8-2
\f
 





                   DCL Details




                   $ 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

                   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.4  How do I generate a random number in DCL?

                   Here is a 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).



















                                                                       8-3
\f
 





                   DCL Details




                   $! 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
                   $
                   $ __SEED == __SEED * 69069 + 1
                   $
                   $ RANDOM == (__SEED.AND.%X3FFFFFFF)/(%X40000000/__CEIL)
                   $
                   $ RETURN

          __________________________________________________________
          8.5  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

                   8-4
\f
 





                   DCL Details




                   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.1.

          __________________________________________________________
          8.6  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
                   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/

                                                                       8-5
\f
 





                   DCL Details




                   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.7  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.openvms.compaq.com/wizard/

                   o  http://www.openvms.compaq.com/wizard/wizard.zip

                   For additional information, please see Section 3.9.

                   DCL does not include support asynchronous I/O, thus a
                   predetermined protocol or a predetermined "turn-around"
                   command sequence must be implemented in order to avoid
                   protocol deadlocks-cases where both tasks are trying to
                   write or both tasks are trying to read. The task that
                   is writing messages to the network must write (or write
                   and read) a predetermined sequence of messages, or it
                   must write a message that tells the reader that it can
                   now start writing messages. (This is the essence of a
                   basic half-duplex network protocol scheme.)

          __________________________________________________________
          8.8  How can I get the width setting of a terminal?

                   $ width = f$getdvi(terminal,"DEVBUFSIZ")

                   8-6
\f
 





                   DCL Details



          __________________________________________________________
          8.9  How can I substitute symbols in a PIPE?

                   Use DCL ampersand substitution, and not apostrophe
                   substitution.

                   $ pipe show system | search sys$input opcom | (read sys$input pid ;
                       pid=f$element(0," ",pid) ; define/system opcom_pid &pid)
                   $ show log opcom_pid
                       "OPCOM_PID" = "0000020B" (LNM$SYSTEM_TABLE)

          __________________________________________________________
          8.10  Use of RUN/DETACH, LOGINOUT, and logical names?

                   With a command to create a detached process such as:

                   $ RUN/DETACHED SYS$SYSTEM:LOGINOUT /INPUT=TEMP_INPUT.COM

                   If you are trying to use a logical name as the /INPUT,
                   /OUTPUT or /ERROR on a RUN/DETACH command, then
                   you must translate the logical name specifications
                   to physical references before passing them, or the
                   definitions must reside in a logical name table that is
                   visible to the newly-created process.

                   Also note that LOGINOUT only creates the SYS$LOGIN,
                   SYS$LOGIN_DEVICE, and SYS$SCRATCH logical names if it
                   is processing a login that is based on the contents of
                   a SYSUAF record-without access to the associated SYSUAF
                   record, this information is not available to LOGINOUT.
                   (If you want to see these particular logical names
                   created, then please specify the /AUTHORIZE qualifier
                   on the RUN/DETACHED command.)

                   If you do not specify LOGINOUT as the image, then
                   there is no easy way to get these logical names. Also,
                   any logical names that are used in the target image
                   file specification must also be in a logical name
                   table accessible (by default) by the newly-created
                   detached process. Shared tables include the group (if
                   the process is in the same UIC group) and the system
                   table. (If the target process is to be in another UIC
                   group, a suitablly privileged user or application can
                   create the necessary logical name(s) directly in the
                   other group logical name table.)

                                                                       8-7
\f
 





                   DCL Details




                   When in doubt, create a short DCL command file as
                   input, and use a SHOW LOGICAL and similar commands
                   to examine the context. (And use physical device and
                   directory references on the RUN/DETACH of the LOGINOUT
                   image, when specifying this command file as /INPUT.)
                   Also remember to check both security auditing and
                   system accounting when troubleshooting problems with
                   the RUN/DETACH.

                   Also see Section 8.1.

          __________________________________________________________
          8.11  How to use escape and control characters in DCL?

                   To write a message and then the bell character, use:

                   $ bell[0,7] = 7
                   $ write sys$output "Hello''bell'"

                   To write blinking text, use:

                   $ esc[0,7] = 27
                   $ text = "Blinking Text"
                   $ write sys$output "''esc'[5m''text'''esc'[m"

                   Also see sections Section 11.7, Section 12.1.


















                   8-8
\f
 










                   _______________________________________________________

          9        Files



          __________________________________________________________
          9.1  How can I undelete a file?

                   OpenVMS doesn't have an "undelete" function. However,
                   if you are quick to write-protect the disk or if you
                   can guarantee that no new files get created or existing
                   files extended, your data is still on the disk and
                   it may be possible to retrieve it. The FLORIAN tool
                   available from various websites can potentially recover
                   the file, see question Section 13.1 for pointers. Other
                   alternatives here include the DFU tool, available on
                   the OpenVMS Freeware CD-ROM distribution.

                   If you are setting up a user environment for yourself
                   or for others, it is quite easy to use DCL to intercept
                   the DELETE command, using a symbol:

                   $ DEL*ETE :== @SYS$LOGIN:MYDELETE.COM

                   The DELETE symbol will cause the procedure to
                   be invoked whenever the user enters the DELETE
                   command, and it can copy the file(s) to a "trashcan"
                   subdirectory before issuing a "real" DELETE on the
                   files. Other procedures can retrieve the file(s) from
                   the "trashcan" subdirectory, and can (and should) clean
                   out the "trashcan" as appropriate. (Realize that this
                   DELETE symbol can interfere with DELETE/GLOBAL and
                   other similar DCL commands.)

          __________________________________________________________
          9.2  Why does SHOW QUOTA give a different answer than DIR/SIZE?

                   DIRECTORY/SIZE doesn't take into account the size of
                   file headers which are charged to your quota. Also,
                   unless you use DIRECTORY/SIZE:ALL, you will see only
                   the "used" size of the file, not the allocated size
                   which is what gets charged against your quota. Also,
                   you may have files in other directories.

                                                                       9-1
\f
 





                   Files




                   $ DIRECTORY/SIZE=ALL/GRAND [username...]
                   Grand total of D1 directories, F1 files, B1/B2 blocks.
                   $ DIRECTORY/SIZZ=ALL/GRAND [-]username.DIR
                   Grand total of 1 directory, 1 file, B3/B4 blocks.
                   $ SHOW QUOTA
                   User [username] has B5 blocks used, B6 available
                   of B7 authorized and permitted overdraft of B8 blocks on disk

                   If the user has no files in other directories and
                   all file-headers are only 1 block, then the following
                   should apply:

                     B5=B2+B4+F1+1

                   If the diskquota has drifted out of synchronization,
                   then the system-manager can force a quota rebuild-due
                   to various factors, the quota file can potentially
                   drift from the actual use over time, and a periodic
                   rebuild can be performed at appropriate intervals.

                   Also be aware that the DIRECTORY/SIZE command can
                   report larger values than might otherwise be expected
                   when used to evaluate files and/or directories that
                   are alias links-such as the system roots on OpenVMS
                   system disks-as the command reports a total that
                   is cumulative over all of the files and directories
                   examined, without regard for which ones might be
                   alias entries and which are not. (In other words, a
                   DIRECTORY/SIZE of an entire OpenVMS system disk will
                   report a disk useage value larger than the (usually
                   more accurate) value reported by the SHOW DEVICE
                   command. This as a result of the alias entries linking
                   each SYS$SYSDEVICE:[SYSCOMMON]SYS*.DIR directory file
                   and the SYS$SYSDEVICE:[000000]VMS$COMMON.DIR file
                   together.)

          __________________________________________________________
          9.3  How do I make sure that my data is safely written to disk?

                   If your application must absolutely guarantee that
                   data is available, no matter what, there's really no
                   substitute for RMS Journaling and host- or controller-
                   based shadowing. However, you can achieve a good degree
                   of data integrity by issuing a SYS$FLUSH RMS call at
                   appropriate times (if you're using RMS, that is.) If
                   you're using a high-level language's I/O system, check

                   9-2
\f
 





                   Files




                   that language's documentation to see if you can access
                   the RMS control blocks for the open file. In C you can
                   use fflush followed by fsync.

                   For details on disk bad block handling on MSCP and
                   on SCSI disk devices, please see Ask The Wizard (ATW)
                   topic (6926).

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

                   o  http://www.openvms.compaq.com/wizard/wizard.zip

                   For additional information, please see Section 3.9.

          __________________________________________________________
          9.4  What are the limits on file specifications and directories?

                   A file specification has an aggregate maximum size
                   of 255 characters at present. The node and device
                   specification may be up to 255 characters each -
                   file name and file types may be up to 39 characters
                   each. File versions are from 1 through 32767, though
                   0 (latest version), -0 (oldest version) and -n (n'th
                   previous version) can be used in most contexts. A file
                   specification may not have more than 8 directories
                   and subdirectories - while it is possible to create
                   subdirectories of greater depth, accessing them is
                   problematic in most cases and this should be avoided.

                   Application developers should use OpenVMS-supplied
                   routines for parsing file specifications - this ensures
                   that changes in what is allowable will not tend to
                   break your application. Consider that various parts of
                   the file specification may contain quoted strings with
                   embedded spaces and other punctuation! Some routines
                   of interest are SYS$FILESCAN, SYS$PARSE and LIB$TRIM_
                   FILESPEC. For further information, see the OpenVMS
                   Guide to File Applications.

                   Performance of larger directory files improves
                   (greatly) with OpenVMS V7.2 and later-operations on
                   directory files of 128 blocks and larger were rather
                   slower on earlier OpenVMS releases due to the smaller
                   size of the directory cache and due to the directory
                   I/O processing logic.

                                                                       9-3
\f
 





                   Files




                   For fastest directory deletions, consider a reverse
                   deletion-delete from the last file in the directory to
                   the first. This reversal speeds the deletion operation
                   by avoiding unnecessary directory I/O operations as
                   the files are deleted. Tools such as the Freeware DFU
                   can be used for this purpose, as can various available
                   reverse-DELETE DCL command procedures.

          __________________________________________________________
          9.5  What is the largest disk volume size OpenVMS can access?

                   One Terabyte (TB; 2**31 blocks of 2**9 bytes;
                   0x07FFFFFFF blocks). 255 volumes in a volume set.
                   The largest contiguous allocation possible for any
                   particular file is 0x03FFFFFFF blocks.

                   Prior to the release of V6.0, the OpenVMS file system
                   was limited to disk volumes of 8.38 GB (2**24 blocks,
                   16777216 blocks) or less.

                   On some systems, there are restrictions in the console
                   program that limit the size of the OpenVMS system disk.
                   Note that data disks are not affected by console
                   program limits. For example, all members of the
                   VAXstation 3100 series are limited to a system disk
                   to 1.073 GB or less due to the console, though larger
                   data disks are possible. This limit due to the SCSI
                   drivers used by and built into the console ROM to read
                   the OpenVMS bootstrap files, and these same drivers are
                   also used by OpenVMS to write the system crashump.

                   There are numerous discussions of this VAXstation
                   3100 in the comp.os.vms newsgroup archives. Please
                   use Google newsgroup search to search the archives for
                   further details, for discussions of the workarounds,
                   and for details of the potential for a simple failed
                   bootstrap and particularly for discussions of the
                   potential for severe system disk corruptions on
                   crashes.

                   Some SCSI disks with capacities larger than 8.58
                   gigabytes (GB) will require the use of an OpenVMS ECO
                   kit (eg: ALPSCSI04_062 or later; see Section 14.26
                   for details) for new SCSI device drivers. Failure to
                   use this ECO can cause "rounding errors" on the SCSI
                   disk device capacity-OpenVMS will not use nor display

                   9-4
\f
 





                   Files




                   the full capacity of the drive-and "%sysinit-e-error
                   mounting system device status equals 000008C4" (8C4
                   -> "%SYSTEM-?-FILESTRUCT, unsupported file structure
                   level") errors during bootstrap. (One workaround for
                   the bootstrap when the bitmap is located far into the
                   disk is the use of INIT/INDEX=BEGIN.) The problem here
                   involves the particular extensions and fields used for
                   larger capacity disks within the SCSI specifications
                   and within the various intepretations of same.

                   For ATA (IDE) disk drives:

                   o  Versions of SYS$DQDRIVER *BEFORE* X-15 topped out at
                      8.455 GB.

                      Fixed drivers (equal or greater than "X-15") were
                      shipped in:

                     o  OpenVMS Alpha V7.2-1, and later

                     o  V7.2 UPDATE V1.0 ECO, and later

                     o  V7.1-2 UPDATE V1.0 ECO, and later

                     o  V7.1-2 UPDATE V3.0 ECO, and later

                   o  The newer SYS$DQDRIVER driver operates to disks up
                      to 33 GB without (known) problems, and effectively
                      works with rather larger disks (up to circa 137
                      GB) but is known to report an incorrect number of
                      "cylinders" with disks above 33 GB.

                   See Section 14.4.4.2 for additional ATA SYS$DQDRIVER
                   information.

                   Be aware that a known restriction in certain older
                   versions of the Alpha SRM Console prevents booting most
                   ATA (IDE) drives larger than 8.455 GB, depending on
                   exactly where the various files are located on the
                   volume. Updated SRM consoles for systems with SRM
                   and ATA (IDE) drive support are (will be) available.
                   (OpenVMS Engineering has successfully bootstrapped
                   20GB ATA (IDE) disks using the appropriate SRM console
                   version.)

                                                                       9-5
\f

 ---------------------------- #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



  reply	other threads:[~2003-07-03 17:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-03 17:09 OpenVMS Frequently Asked Questions (FAQ), Part 1/9 Hoff Hoffman
2003-07-03 17:11 ` OpenVMS Frequently Asked Questions (FAQ), Part 2/9 Hoff Hoffman
2003-07-03 17:12   ` OpenVMS Frequently Asked Questions (FAQ), Part 3/9 Hoff Hoffman
2003-07-03 17:13     ` Hoff Hoffman [this message]
2003-07-03 17:14       ` OpenVMS Frequently Asked Questions (FAQ), Part 5/9 Hoff Hoffman
2003-07-03 17:15         ` OpenVMS Frequently Asked Questions (FAQ), Part 6/9 Hoff Hoffman
2003-07-03 17:16           ` OpenVMS Frequently Asked Questions (FAQ), Part 7/9 Hoff Hoffman
2003-07-03 17:17             ` OpenVMS Frequently Asked Questions (FAQ), Part 8/9 Hoff Hoffman
2003-07-03 17:18               ` OpenVMS Frequently Asked Questions (FAQ), Part 9/9 Hoff Hoffman
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox