Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: hoff@hp.nospam (Hoff Hoffman)
Subject: OpenVMS Frequently Asked Questions (FAQ), Part 5/11
Date: Mon, 11 Apr 2005 19:47:59 GMT	[thread overview]
Message-ID: <PvA6e.3488$IL.2302@news.cpqcorp.net> (raw)
In-Reply-To: ytA6e.3487$IL.1146@news.cpqcorp.net


Archive-name: dec-faq/vms/part5
Posting-Frequency: quarterly
Last-modified: 11 Apr 2005
Version: VMSFAQ_20050411-05.TXT

 





                   System Management Information




                   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.

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

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

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

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

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

                                                                      5-51
\f
 





                   System Management Information



          __________________________________________________________
          5.42__Please_help_me_with_the OpenVMS BACKUP utility?

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

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

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

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

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

          _____________________________
          5.42.1.2  Can you get the old BACKUP behaviour back?

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




                   5-52
\f
 





                   System Management Information



          _____________________________
          5.42.2  What can I do to improve BACKUP performance?

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

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

                   See the OpenVMS V6.2 release notes for additional
                   details.

          _____________________________
          5.42.3  Why is BACKUP not working as expected?

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

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

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

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

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

                                                                      5-53
\f
 





                   System Management Information




                   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.

                   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

                   5-54
\f
 





                   System Management Information




                      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.42.4  How do I fix a corrupt BACKUP saveset?

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

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

                   $ @RESET_BACKUP_SAVESET_FILE_ATTRIBUTES.COM

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

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

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

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

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

                                                                      5-55
\f
 





                   System Management Information




                   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.42.5  How do I write a BACKUP saveset to a remote tape?

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

                   RECORD
                           FORMAT                  fixed
                           SIZE                    8192

                   Then create BACKUP_SERVER.COM:

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

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

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



                   5-56
\f
 





                   System Management Information




                   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.42.6  How to perform a DoD security disk erasure?

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

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

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

                   With data of greater value or with data exposure
                   (sometimes far) more costly than the residual value
                   of the disk storage involved, the physical destruction
                   of the platters may well be the most expedient,

                                                                      5-57
\f
 





                   System Management Information




                   economical, and appropriate approach. The unintended
                   exposure of a bad block containing customer healthcare
                   data or of credit card numbers can quite be costly,
                   of course, both in terms of the direct loss, and the
                   longer-term and indirect costs of such exposures.

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

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

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








                   5-58
\f
 





                   System Management Information



          _____________________________
          5.42.7  How to enable telnet virtual terminals?

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

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

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

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

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

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

                   TTY_DEFCHAR2 = %X20000

                   This value is TT2$M_DISCONNECT.

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

                   $ UCX
                   UCX> SET CONF COMM/REMOTE=VIRTUAL

          _____________________________
          5.42.7.1  Volume Shadowing MiniCopy vs MiniMerge?

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

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

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

                                                                      5-59
\f
 





                   System Management Information




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

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

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

          _____________________________
          5.42.7.1.1  Mini-Copy?

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

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

                   5-60
\f
 





                   System Management Information



          _____________________________
          5.42.7.1.2  Mini-Merge?

                   A Shadowing Merge is initiated when an OpenVMS node
                   in the cluster (which had a shadowset mounted) crashes
                   or otherwise leaves unexpectedly, without dismounting
                   the shadowset first. In this case, OpenVMS must ensure
                   that the data is identical, since Shadowing guarantees
                   that the data on the disks in a shadowset will be
                   identical. In a regular Merge operation, Shadowing uses
                   an algorithm similar to the Full Copy algorithm (except
                   that it can choose either of the members' contents
                   as the source data, since both are considered equally
                   valid), and scans the entire disk. Also, to make things
                   worse, for any read operations in the area ahead of
                   what has been merged, Shadowing will first merge the
                   area containing the read data, then allow the read to
                   occur.

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

          __________________________________________________________
          5.43  Please explain DELETE/ERASE and File Locks?

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




                                                                      5-61
\f
 





                   System Management Information



          __________________________________________________________
          5.44  Managing File Versions?

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

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

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

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

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

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

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

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

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

                   5-62
\f
 





                   System Management Information




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

                   DFU SEARCH/VERSION=MINIMUM=nnnn

                   If you are creating or supporting an application,
                   selecting temporary or log file filenames from among
                   a set of filenames-selecting filenames based on time,
                   on process id, on the day of week, week number, or
                   month, on the f$unique lexical (V7.3-2 and later), etc-
                   is often useful, as this approach more easily permits
                   on-line adjustments to the highest file versions and
                   easily permits on-line version compression using
                   techniques shown above. With differing filenames,
                   you are less likely to encounter errors resulting
                   from files that are currently locked. You can also
                   detect the impending version number limit within the
                   application, and can clean up older versions and roll
                   the next file version creation to ;1 or such.

                   Also see Section 9.4.























                                                                      5-63
\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 X Windows display, you
                      can use the OpenVMS version of Netscape Navigator or
                      Mozilla. The mail download protocol chosen to access
                      the mail server from the Navigator or Mozilla mail
                      client can be POP or IMAP, with the former causing
                      messages to be downloaded while the latter permits
                      messages to be retained on the mail server. Most
                      folks prefer IMAP for this reason.

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

                     o  http://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.hp.com/go/openvms/freeware/, look for the
                   directory /dqdriver/), and these updates are also
                   included on OpenVMS Freeware V5.0, and OpenVMS ECO
                   kits containing newer versions of the driver are
                   available. Freeware V6.0 has a version of DQDRIVER
                   that is newer than that of the OpenVMS Alpha V7.3-2

                                                                       7-1
\f
 





                   Information on Utilities




                   release, with additional capabilities and with improved
                   error diagnostics.

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

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

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

                   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/

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

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





                   7-2
\f
 





                   Information on Utilities



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

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

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

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

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

                   Ensoniq sound support is also available.

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

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

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

                   o  http://www.encompassus.org

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

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

                   Using the OpenVMS Freeware tool ZAP:

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

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






















                   7-4
\f
 










                   _______________________________________________________

          8        DCL Details



          __________________________________________________________
          8.1  DCL Symbols and OpenVMS Logical Names?

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

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

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

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

                                                                       8-1
\f
 





                   DCL Details




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

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

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

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

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

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

                   8-2
\f
 





                   DCL Details




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

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

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

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

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

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

          __________________________________________________________
          8.2  How do I run a program with arguments?

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

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

                                                                       8-3
\f
 





                   DCL Details




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

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

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

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

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

                   See also Section 10.3.

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

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

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

                   8-4
\f
 





                   DCL Details




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

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

                   Also see Section 8.12.

          __________________________________________________________
          8.3  How can I clear the screen in DCL?

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

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

                   $ CLS :== TYPE/PAGE NLA0:

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

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

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

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

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

                                                                       8-5
\f
 





                   DCL Details




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

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

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

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

                   8-6
\f
 





                   DCL Details




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

          __________________________________________________________
          8.6  What does the MCR command do?

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

                   $ MCR FOO BAR

                   is equivalent to:

                    $ FOO :== $FOO
                    $ FOO BAR

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

          __________________________________________________________
          8.7  How do I change the OpenVMS system prompt?

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

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

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

                                                                       8-7
\f
 





                   DCL Details




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

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

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

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

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

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

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

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

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

                   Yes, you can do this with DCL.

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

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

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

                   8-8
\f
 





                   DCL Details




                   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.9  How can I get the width setting of a terminal?

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

          __________________________________________________________
          8.10  Why doesn't DCL symbol substitution work?

                   The DCL symbol substitution processing occurs only
                   at the DCL prompt, not within data and not within
                   files. If you wish to perform symbol substitution in
                   this environment, you typically write a small file
                   containing the command(s) and data to be invoked-
                   potentially only the data-and you then invoke the
                   created procedure or reference the specified data.

                   In this case, use of a file containing nolinemode
                   commands or other techniques might be useful-you will
                   want to ensure that the text editor you use does not
                   attempt to use screen mode or similar, as this is not
                   generally considered adventageous within a command
                   procedure.

                   Tools such as FTP have alternatives: COPY/FTP.

                   DCL symbol substitution occurs in two passes, using
                   the ampersand and the apostrophe. In most cases, only
                   the apostrophe is necessary. In a few cases-such as the
                   DCL PIPE command-you will may need to use the ampersand
                   to get the substitution to work. The following example
                   uses ampersand substitution to transfer the contents of
                   the header into a logical name:

                   $ PIPE CC/VERSION | (READ SYS$PIPE hdr ; DEFINE/JOB/NOLOG hdr &hdr )

                                                                       8-9
\f
 





                   DCL Details




                   A logical name (in the job logical name table; shared
                   by all processes in the current job) was used as DCL
                   symbols cannot be returned back out from a DCL PIPE or
                   other spawned subprocess.

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

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

                   8-10
\f
 





                   DCL Details




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

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

          __________________________________________________________
          8.13  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.6, Section 12.1.











                                                                      8-11
\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.hp.com/go/openvms/wizard/

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

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

                   A file specification has an aggregate maximum size of
                   255 characters (NAM$C_MAXRSS) at present, assuming
                   ODS-2 limits and traditional DCL process parsing
                   settings (SET PROCESS/PARSE_STYLE). 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 or-with a rooted directory, two sets of
                   eight are possible-and while it is possible to create
                   subdirectories of greater depth, accessing them under
                   ODS-2 is somewhat problematic in most cases, and thus
                   should be avoided.

                   Under ODS-5 with extended DCL parsing (SET
                   PROCESS/PARSE_STYLE), the filename length limits
                   are up around 4,095 (NAML$C_MAXRSS) characters, and
                   directories can be around 255 levels deep.

                   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_

                                                                       9-3
\f
 





                   Files




                   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.

                   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.

                   Also see Section 5.44.

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


                   9-4
\f
 





                   Files




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

                                                                       9-5
\f
 





                   Files




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

                                             Note

                      All disk-related listed in this section are
                      stated in units of "disk (base ten) gigabytes"
                      (1 GB = 10^9 bytes) and not in units of "software
                      (base two) gigabytes" (1 GB = 2^30; 1 GB =
                      1073741824.) bytes. Please see Section 14.24 for
                      details of the nomenclature and of the units.

                   Be aware that larger disks that are using an extension
                   of SCSI-2- disks that are using a mode page field
                   that the SCSI-2 specifications normally reserved for
                   tape devices-to permit a larger disk volume size will
                   require a SCSI driver update for OpenVMS, and this
                   change is part of V7.1-2 and later, and also part of
                   ALPSCSI07_062 and later. (These larger disks disks
                   will typically report a DRVERR, or will see the volume
                   size "rounded down".) SCSI disks larger than 16777216
                   blocks cira 8.455 GB (base ten); 8GB (base two) require
                   this ECO, or require the use of OpenVMS Alpha V7.1-2 or
                   later.

                   Applications written in C can be limited to file
                   sizes of two gigabytes and less, as a result of the
                   use of longword values within C file operations, and
                   specifically off_t. This restriction is lifted in
                   OpenVMS V7.3-1 and later, and with the application of
                   the C ECO kits available for specific earlier releases.
                   The use of a longword for off_t restricts applications
                   using native C I/O to file sizes of two gigabytes or
                   less, or these applications must use native RMS or XQP
                   calls for specific operations.

                   9-6
\f
 





                   Files




                   Also see Section 14.13, Section 14.24.

          __________________________________________________________
          9.6  What is the maximum file size, and the RMS record size
               limit?

                   RMS can store individual files of a size up to the
                   maximum supported volume size. Under OpenVMS V6.0 and
                   later, the volume size and the RMS maximum file size
                   limit is 2**31 * 512 bytes-one terabyte (1 TB).

                   "Use a volume set to provide a large, homogeneous
                   public file space. You must use a volume set to create
                   files that are larger than a single physical disk
                   volume. (The file system attempts to balance the load
                   on the volume sets, for example, by creating new files
                   on the volume that is the least full at the time.)"

                   "You can add volumes to an existing volume set at any
                   time. The maximum number of volumes in a volume set is
                   255."

                   The RMS formats-sequential, relative, and indexed-
                   are limited by the one terabyte maximum volume size.
                   RMS relative files are further limited to a number of
                   records that will fit in 32 bits-4 billion records.
                   Sequential and indexed formats do not have a record
                   limit.

                   Also see Section 2.17.1, Section 14.24.

          __________________________________________________________
          9.7  How do I write CD-Recordable or DVD media on OpenVMS?

                   How to create CD-R, CD-RW, DVD-R, DVD+R, DVD-RW, or
                   DVD+RW media on OpenVMS?

                   Recording (writing) of CD and DVD optical media
                   requires a recording or media mastering application
                   or tool, and both commercial and non-commercial
                   options are available. Please see CDRECORD (both non-
                   DVD and DVD versions are available, and at least one
                   commercial version is available), and also see DVDwrite
                   (commercial) or DVDRECORD (open source). A port of
                   CDRECORD is present in OpenVMS V7.3-1 and later; see
                   Section 9.7.

                                                                       9-7
\f
 





                   Files




                   o  Acquire a comparatively recent SCSI-based or ATA
                      (IDE) CD-R or DVD-R/RW or DVD+R/RW drive. Older
                      drives can be very problematic, while newer drives
                      are readily available, and are cheap and very fast.
                      Related device requirements information is available
                      in Section 14.28.

                   o  Get the most recent LDDRIVER available on the
                      Freeware. Versions of LDDRIVER are latent in
                      OpenVMS Alpha V7.3-1 and later. (Look within
                      SYS$MANAGER:CDRECORD.COM for related details.)

                      Use of the current ECO kit for LDDRIVER (as
                      available), or of the version of LD distributed
                      with V8.2 (kitted on Freeware V7.0 as LD071), or
                      later is prefered. (If you are not running the
                      specified version, you will want to upgrade or you
                      will want to use the DCL command SET FILE/CACHING_
                      ATTRIBUTES=NO_CACHING on the LD partition file.
                      This is a workaround for an incompatibility found
                      between older LDDRIVER versions and the XFC caching
                      support.) Alternatively, you can acquire and load
                      the VD64 package from the Freeware.

                   o  Get CDRECORD or CDWRITE or other similar recording
                      tool.

                      CDRECORD (part of CDRTOOLS), CDWRITE, and
                      DVDRECORD (part of DVDRTOOLS) packages
                      (DVDRECORD is a fork of CDRECORD) are freely
                      available, and versions of CDRECORD are
                      available on the Freeware V6.0 distribution. (
                      http://www.hp.com/go/openvms/freeware/ ) An OpenVMS
                      port of the cmcd CD audio ripper is also reportedly
                      available. http://www.amb.org/xmcd/

                      Versions of CDRECORD (non-DVD) are latent in OpenVMS
                      Alpha V7.3-1 and later. Commercial versions of
                      CDDRECORD-with DVD capabilities-are also available
                      for various platforms, and particularly a variant of
                      CDRECORD known as CDRECORD-ProDVD.

                      Beware the tool chosen: some versions and
                      configurations of CDRECORD can record DVD media,
                      as can the DVDRECORD package, as can the commercial
                      DVDwrite package. Many versions of CDRECORD cannot
                      record DVD media, including the version of CDRECORD

                   9-8
\f
 





                   Files




                      latent within OpenVMS and the version found on
                      Freeware V6.0; these versions cannot record DVD
                      media.

                   o  Build the contents of the disk on the LD or VD64
                      device partition.

                   o  Use the chosen recording tool to record the contents
                      of the LD or VD64 partition directly onto the
                      optical medium.

                   Alternatively, consider the following command on
                   OpenVMS Alpha V7.3-1 and later:

                   @SYS$MANAGER:CDRECORD.COM HELP

                   While folks have had success getting PC-based CD-R/RW
                   or DVD-R/RW or DVD+R/RW tools to work with OpenVMS
                   partitions, it is far easier and more reliable to use
                   the OpenVMS-based versions of these tools and directly-
                   attached devices. If you use a Windows-based tool, you
                   will want to specifically select its raw mode, image
                   mode, or block-copy mode, depending on the terminology
                   within the particular tool. The transfer mode and
                   selections is variously refered to as a disk-at-once
                   (DAO) 2048-byte block ISO Mode 1 raw/image/block data
                   disk recording mode.

                   More details: Creation of CD recordable or DVD
                   recordable media under OpenVMS typically involves
                   one of two approaches: the use of the optional CD-R
                   (`Scribe') capabilities available for the InfoServer or
                   other "offline" hardware packages (PC-based packages
                   will be included in this), or the use of a host-based
                   package such as the CDRECORD or CDWRITE13_VMS or other
                   utilities, including OpenVMS ports of common open-
                   source tools made available by Dr. Eberhard Heuser-
                   Hofmann and various others. Commercial packages and
                   options are also available. Dr. Heuser-Hofmann has
                   DVDwrite , a commercial package which can record DVD
                   media. ( http://home.tiscali.de/dvd4openvms )

                   OpenVMS can read ODS-2, ODS-5, and ISO-9660 format
                   CD-ROMs. (If you are very careful, you can create a
                   dual-format CD-R; a CD-R with both ODS-2 and ISO-9660
                   or both ODS-5 and ISO-9660 or both.)

                                                                       9-9
\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:[~2005-04-11 19:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-11 19:35 OpenVMS Frequently Asked Questions (FAQ), Part 1/11 Hoff Hoffman
2005-04-11 19:40 ` OpenVMS Frequently Asked Questions (FAQ), Part 2/11 Hoff Hoffman
2005-04-11 19:42   ` OpenVMS Frequently Asked Questions (FAQ), Part 3/11 Hoff Hoffman
2005-04-11 19:45     ` OpenVMS Frequently Asked Questions (FAQ), Part 4/11 Hoff Hoffman
2005-04-11 19:47       ` Hoff Hoffman [this message]
2005-04-11 19:49         ` OpenVMS Frequently Asked Questions (FAQ), Part 6/11 Hoff Hoffman
2005-04-11 19:51           ` OpenVMS Frequently Asked Questions (FAQ), Part 7/11 Hoff Hoffman
2005-04-11 19:53             ` OpenVMS Frequently Asked Questions (FAQ), Part 8/11 Hoff Hoffman
2005-04-11 19:55               ` OpenVMS Frequently Asked Questions (FAQ), Part 9/11 Hoff Hoffman
2005-04-11 19:56                 ` OpenVMS Frequently Asked Questions (FAQ), Part 10/11 Hoff Hoffman
2005-04-11 19:57                   ` OpenVMS Frequently Asked Questions (FAQ), Part 11/11 Hoff Hoffman
  -- strict thread matches above, loose matches on Subject: below --
2005-09-04 19:50 OpenVMS Frequently Asked Questions (FAQ), Part 1/11 Hoff Hoffman
2005-09-04 19:53 ` OpenVMS Frequently Asked Questions (FAQ), Part 2/11 Hoff Hoffman
2005-09-04 19:55   ` OpenVMS Frequently Asked Questions (FAQ), Part 3/11 Hoff Hoffman
2005-09-04 19:57     ` OpenVMS Frequently Asked Questions (FAQ), Part 4/11 Hoff Hoffman
2005-09-04 19:59       ` OpenVMS Frequently Asked Questions (FAQ), Part 5/11 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