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

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







                  OpenVMS Programming Information




                  older DEC C versions can sometimes cause the compiler
                  troubles locating header files.)

                  HP C V5.6 and later include a backport library, a
                  mechanism by which HP C running on older OpenVMS
                  releases can gain access to newer RTL routines added
                  to the RTL in later OpenVMS releases-the language RTLs
                  ship with OpenVMS itself, and not with the compilers.

                  Example C code is available in SYS$EXAMPLES:, in
                  DECW$EXAMPLES (when the DECwindows examples are
                  installed), in TCPIP$SERVICES (or on older releases,
                  UCX$EXAMPLES) when HP TCP/IP Services is installed), on
                  the Freeware CD-ROMs, and at web sites such as

                  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.

         _____________________________
         10.22.1  Other common C issues

                  The localtime()  function and various other functions
                  maintain the number of years since 1900 in the "struct
                  tm" structure member tm_year. This field will contain a
                  value of 100 in the year 2000, 101 for 2001, etc., and
                  the yearly incrementation of this field is expected to
                  continue.

                  The C epoch typically uses a longword (known as time_
                  t) to contain the number of seconds since midnight
                  on 1-Jan-1970. At the current rate of consumption of
                  seconds, this longword is expected to overflow (when
                  interpreted as a signed longword) circa 03:14:07 on
                  19-Jan-2038 (GMT), as this time is circa 0x7FFFFFFF
                  seconds since the C base date. (The most common
                  solution is to ensure that time_t is an unsigned.)

                  If C does not correctly handle the display of the
                  local system time, then check the UTC configuration
                  on OpenVMS-the most common symptom of this is a skew of
                  one hour (or whatever the local daylight saving time
                  change might be). This skew can be caused by incorrect
                  handling of the "is_dst" setting in the application

                                                                    10-21







                  OpenVMS Programming Information




                  program, or by an incorrect OpenVMS UTC configuration
                  on the local system. (See section Section 4.4.)

                  Floating point is prohibited in OpenVMS Alpha inner-
                  mode (privileged) code, and in any process or other
                  execution context that does not have floating point
                  enabled. C programmers developing and working with
                  OpenVMS Alpha high-IPL kernel-mode code such as device
                  drivers will want to become familiar with the floating
                  point processing available in the environment, and with
                  the C compiler qualifier /INSTRUCTION_SET=[NO]FLOATING_
                  POINT. Device drivers and other similar kernel-mode C
                  code must be compiled with /INSTRUCTION_SET=FLOATING_
                  POINT and /EXTERN_MODEL=STRICT_REFDEF.

                  Additionally, the SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY
                  parameter will be needed to be appended to the module
                  specification or declared via the C compiler's include
                  library logical name mechanism when the C compiler is
                  resolving kernel-mode data structures and definitions.
                  This library contains OpenVMS kernel-mode and other
                  system declaractions, and particularly a mixture
                  of undocumented definitions and declarations, and
                  particularly definitions and declarations that are
                  subject to change (and that can accordingly lead to
                  requirements for the recompilation of application
                  code).

                  In addition to the user-mode C Run-Time Library (RTL)
                  mentioned in the OpenVMS C RTL documentation and
                  referenced over in Section 3.9, there is a second and
                  parallel kernel-mode RTL accessable to device drivers
                  and other kernel code on OpenVMS Alpha and OpenVMS
                  I64. The most common time this second C library is
                  noticed is when C code is (erroneously) linked with
                  /SYSEXE/SYSLIB, and duplicate symbol errors typically
                  then arise. As code running in supervisor-, executive-
                  or kernel-mode context cannot call out a user-mode
                  RTL or other user-mode library, you will want to
                  respecify the command as LINK /SYSEXE/NOSYSLIB. This
                  will eliminate the duplicate symbol errors, since only
                  the kernel-mode library will be referenced, and it will
                  also avoid calling out into the user-mode libraries.

                  10-22







                  OpenVMS Programming Information




                  When sharing variables with other languages, here is
                  some example HP C code...

                        ...
                        #pragma extern_model save
                        #pragma extern_model strict_refdef
                        extern int   VMS$GL_FLAVOR;
                        #pragma extern_model restore
                        ...

                  and here is some associated example Bliss code...

                        ...
                        EXTERNAL
                           VMS$GL_FLAVOR,
                        ....

         _____________________________
         10.22.2  Other common C++ issues

                  HP C++ (a separate compiler from HP C) provides
                  both symbol mangling and symbol decoration. Some
                  of the details of working with longer symbol names
                  and the resulting symbol name mangling in mixed
                  language environments are listed in the shareable
                  image cookbook, and in the C++ documentation. Symbol
                  name decoration permits the overloading of functions
                  (by adding characters to the external symbol for
                  the function to indicate the function return type
                  and the argument data types involved), and mixed-
                  language external references can and often do need to
                  disable this decoration via the extern "C" declaration
                  mechanism:

                        extern "C"
                          {
                          extern int ExternSymbol(void *);
                          extern int OtherExternSymbol(void *);
                          }

                  Also see Section 14.7 for information on /ARCHITECTURE
                  and /OPTIMIZE=TUNE.

                  See Section 10.15 for information on the C system and
                  the lib$spawn call in CAPTIVE environments.

                                                                    10-23







                  OpenVMS Programming Information




                  Constructs such as the order of incrementation or
                  decrementation and the order of argument processing
                  within an argument list are all implementation-defined.
                  This means that C coding constructs such as:

                      i = i++;
                      a[i] = i++;
                      foo( i, i++, --i);

                  are undefined and can have (adverse) implications when
                  porting the C code to another C compiler or to another
                  platform. In general, any combination of ++, -, =, +=,
                  -=, *=, etc operators that will cause the same value to
                  be modified multiple times (between what the ANSI/ISO C
                  standard calls "sequence points") produce undefined and
                  implementation-specific results.

                  Within C, the following are the "sequence points":
                  the ";" at the end of a C statment, the ||, &&, ?:,
                  and comma operators, and a call to a function. Note
                  specifically that = is NOT a sequence point, and that
                  the individual arguments contained within a function
                  argument list can be processed from right to left, from
                  left to right, or at any random whim.

                  HP C for OpenVMS VAX (formerly DEC C) and VAX C do
                  differ in the related processing.

                  So you are looking for OpenVMS-specific definitions
                  (include files)?

                  UCBDEF.H, PCBDEF.H and other OpenVMS-specific
                  definitions-these are considered part of OpenVMS and
                  not part of the C compiler kit-are available on all
                  recent OpenVMS Alpha releases.

                  To reference the version-dependent symbol library
                  sys$share:sys$lib_c.tlb, use a command similar to the
                  following for compilation:

                  $ CC sourcea+SYS$LIBRARY:SYS$LIB_C/LIB

                  You can also define DECC$TEXT_LIBRARY to reference the
                  library.

                  You will want to review the Programming Concepts
                  manual, and specifically take a quick look at Chapter
                  21.

                  10-24







                  OpenVMS Programming Information




                  And some general background: the STARLET definitions
                  (and thus the sys$starlet_c.tlb library) contain the
                  symbols and the definitions that are independent of
                  the OpenVMS version. The LIB definitions (and thus
                  sys$lib_c) contain symbols and definitions that can
                  be dependent on the OpenVMS version. You won't need to
                  rebuild your code after an OpenVMS upgrade if you have
                  included definitions from STARLET. The same cannot be
                  said for some of the definitions in LIB-you might need
                  to rebuild your code. (The UCB structure can and has
                  changed from release to release, for instance.)

                  Recent versions of C automatically search sys$starlet_
                  c.tlb. Explicit specification of sys$lib_c.tlb is
                  required.

                  Also see the Ask The Wizard website topics (2486),
                  (3803), and (1661):

                  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.

                  See Section 9.5 for information on the C off_t
                  limitations, resolved in OpenVMS V7.3-1 and later and
                  in ECO kits available for specific OpenVMS 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.

         __________________________________________________________
         10.23  Status of Programming Tools on OpenVMS VAX?

                  DECthreads V7.3 and the HP C compiler (also known as
                  Compaq C and DEC C) V6.4 are presently expected to
                  be the last updates and the last releases of these
                  development packages for use on OpenVMS VAX. The run-
                  time support for both DECthreads (CMA$RTL) and for C
                  (DECC$CRTL) will continue to be maintained, and will
                  continue to be available on OpenVMS VAX. The VAX C
                  V3.2 compiler is the final VAX C compiler release for
                  OpenVMS VAX, and the VAX C Run-Time Library (VAXCRTL)
                  will also continue to be available.

                                                                    10-25







                  OpenVMS Programming Information




                  New development and new features and product
                  enhancements continue for the OpenVMS Alpha and the
                  OpenVMS IA-64 DECthreads and C compilers.

         __________________________________________________________
         10.24  Choosing a Version Number for Application Code?

                  One of the common rules-of-thumb used for choosing a
                  displayed version number string for a new version of a
                  layered product or an application, its implications,
                  and its expected effects on client applications and
                  users, follows:

                  o  No functional and no application-visible changes,
                     bugfixes only-the edit number is incremented.
                     These tend to be very small, very isolated, or ECO-
                     level changes. These can also be distributions for
                     specific hardware configurations or platforms, as
                     is the case with an OpenVMS Limited Hardware Release
                     (LHR). Application rebuilds are not expected, and
                     there is an assumption that general user-provided
                     application-related regression testing will not be
                     required.

                  o  Minimal functional and very few user-visible
                     changes-the maintenance number is incremented. These
                     tend to be very small or even ECO-level changes,
                     though somewhat larger than an edit-level change.
                     Application rebuilds are not expected, and there is
                     an assumption that user-provided application-related
                     regression testing will not be required.

                  o  Various small and upward-compatible functional
                     changes-the minor version number is incremented.
                     The changes are user-visible, and are intended to be
                     user-visible. Application rebuilds are not expected.
                     Some application programmers may choose to perform
                     regression tests.

                  o  Large and/or potentially incompatible changes-
                     the major version number is incremented. Some
                     applications might need to be rebuilt. Various
                     application programmers will choose to perform
                     regression tests of their respective applications.

                  10-26







                  OpenVMS Programming Information




                  For additional version-numbering materials and for
                  information on assigning module generation numbers,
                  please see the OpenVMS (POLYCENTER) Software Product
                  Installation Utility-variously refered to by acronyms
                  including PCSI and SPIA-reference manual available
                  within the OpenVMS documentation set.

                  Of course, all of this is obviously subject to
                  interpretation, particularly around the distinction
                  between large and small changes and such. The scale
                  of the application is also a factor, as larger and
                  more complex applications will tend toward smaller
                  increments and will tend to see the maintenance number
                  incremented, while new releases of smaller applications
                  will tend to see the minor version incremented somewhat
                  more frequently.

                  The goal of all this is to provide a guide to relative
                  scale of changes and the associated effort involved
                  in an upgrade for the user and/or for the application
                  programmer.

         __________________________________________________________
         10.25  Selecting a Process Dump Directory?

                  You can customize the device and directory for the
                  process dump by defining the logical names SYS$PROCDMP
                  and SYS$PROTECTED_PROCDMP. The former is for non-
                  privileged dumps, while the latter is the location
                  where privileged image dumps are written, and
                  preferably an area protected against untrusted access.
                  For example:

                  $ define SYS$PROCDMP SYS$ERRORLOG:
                  $ define /exec SYS$PROTECTED_PROCDMP SYS$ERRORLOG:

                  The abouve presumes that the SYS$ERRORLOG logical name
                  points to a valid location.

                  There is presently no means to change the name of the
                  generated dump file from IMAGENAME.DMP to something
                  else. Accordingly, you will want to use different
                  target directories for this purpose, particularly
                  if there is more than one application or process
                  potentially writing process dumps.

                                                                    10-27







                  OpenVMS Programming Information



         __________________________________________________________
         10.26  Access to Itanium Assembler?

                  If you are interested in accessing the native
                  Intel Itanium assembler within the OpenVMS I64 GNV
                  environment-and since the iasi64 assembler is a Unix
                  program and GNV is a Unix environment for OpenVMS I64-
                  you can simply copy iasi64.ext into your gnu:[bin]
                  directory in place of "as.", and of "AS.EXE".

                  Alternately and probably also better, you can write an
                  "as." script to invoke the iasi64.exe image from its
                  particular prefered location on the local system.

                  A typical "as." script looks like this:

                  path/iasi64.exe $1 $2 $3 $4 $5

         __________________________________________________________
         10.27  Kernel-mode coding restrictions?

                  Floating point is prohibited in OpenVMS Alpha inner-
                  mode (privileged) code, and within any process or other
                  execution context that does not have floating point
                  enabled and available.

                  Programmers developing and working with OpenVMS Alpha
                  high-IPL kernel-mode code, such as device drivers,
                  will further want to become familiar with the floating-
                  point processing and the instruction set emulation
                  available in the particular target environment (if
                  any). When working with C, inner-mode programmers will
                  want to become familiar with the C compiler qualifier
                  /INSTRUCTION_SET=[NO]FLOATING_POINT.

                  Device drivers and other similar kernel-mode C code
                  must be compiled with /INSTRUCTION_SET=FLOATING_POINT
                  and /EXTERN_MODEL=STRICT_REFDEF.

                  Additionally, inner-mode code cannot call out to the
                  user-mode language run-time libraries nor to any of
                  the OpenVMS system run-time libraries. In particular,
                  this prohibition prevents pages of inner-mode-protected
                  memory from being allocated and interspersed within the
                  user-mode heap or other such user-mode data structures.

                  10-28







                  OpenVMS Programming Information




                  The prohibtion on user libraries also generally means
                  that such code must be linked with LINK /NOSYSLIB, and
                  quite probably also with /SYSEXE. The former causes
                  the linker to avoid searching the system shareable
                  image libraries (via IMAGELIB.OLB), while the latter
                  brings in symbols typically only known to or otherwise
                  accessable from the OpenVMS executuve.

                  To include kernel-mode C programming definitions,
                  macros and system constants within a C compilation,
                  include SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY on the C
                  compilation. (Constructs defined within the system
                  macro library LIB.MLB or within its C equivalent
                  SYS$LIB_C.TLB tend to be version-dependent, or
                  undocumented, or both.) As an example of the
                  compilation, the following is a typical C device driver
                  compilation command:

         $   CC /STANDARD=RELAXED_ANSI89/INSTRUCTION=NOFLOATING_POINT/EXTERN=STRICT -
                 'DEBUG_CC_DQ_OPT' 'ARCH_CC_OPT' 'CHECK_CC_OPT' 'SHOW_CC_OPT' -
                 /LIS=LIS$:xxDRIVER/MACHINE_CODE/OBJ=OBJ$:xxDRIVER -
                 SRC$:xxDRIVER.C+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY

                  Additionally, code running in executive mode in an AST
                  or in kernel mode cannot call RMS services, or routines
                  which directly or indirectly call RMS.

                  For related kernel-mode programming materials and
                  driver documentation, please see the Writing OpenVMS
                  Alpha Device Driversin C book, ISBN 1-55558-133-1.

         __________________________________________________________
         10.28  Decoding an Access Violation (ACCVIO) Error?

                  To decode the virtual addresses returned by an access
                  violation or by another similar OpenVMS display, you
                  need to have created and retained a listings file-
                  preferably one with machine code generation enabled-and
                  a full link map.

                  Starting with the virtual address reported by the
                  error, use the link map to find the module that
                  contributed the code that contains the virtual address
                  range. Calculate the offset from the base of the range,
                  by subtracting the base of the range from teh failing
                  virtual address. Then use the compiler listings for

                                                                    10-29







                  OpenVMS Programming Information




                  the particular component that contributed the code to
                  locate the offset of the failing instruction.

                  If the map and listings information was not maintained,
                  working backwards is far more difficult-you are left to
                  use the binary instruction data around the failure to
                  locate the associated source code, and this process is
                  far more involved. This usually involves matching up
                  blocks of decoded instructions around the failing code,
                  or the direct analog involving matching up ranges of
                  decoded instructions. Keep the maps and listing files
                  around, in other words.

                  Rather easier than an approach based on virtual address
                  arithmetic and far easier than working backwards from
                  the instruction stream is to use integrated debugging-
                  this inclusion is arguably an essential component of
                  any non-trivial application-and to use the OpenVMS
                  Debugger.

                  The OpenVMS Debugger in particular can be used to
                  examine the source code, to examine the stack, and can
                  even be programmed to wait patiently for the incidence
                  of a particular value or failure or condition, and
                  this is far easier than working backwards from the
                  instruction stream is to use integrated debugging-
                  this inclusion is arguably an essential component of
                  any non-trivial application-and to use the OpenVMS
                  Debugger. The debugger can also be activated from
                  within a signal handler, and commands to generate
                  a traceback can be generated directly, or through
                  the invocation of a procedure containing a series of
                  debugger commands.

                  Details on the debugger are in the OpenVMS Debugger
                  Manual, and also see the discussion of dyanmically
                  activating the Debugger in Section 10.19.







                  10-30







                  OpenVMS Programming Information



         __________________________________________________________
         10.29  Generating an AUTODIN-II CRC32?

                  The following code can be used to generate an AUTODIN-
                  II 32-bit Cyclic Redundency Check (CRC32) value from an
                  input string descriptor, similar to that used by the HP
                  C compiler for its /NAMES=SHORTENED mechanism, and by
                  various other applications requiring a CRC32.

                  The routine uses the OpenVMS library routine lib$crc_
                  table to generate a sixteen longword array of data from
                  the specified encoded polynomial coefficient (AUTODIN-
                  II, in this case), and then lib$crc to generate the
                  CRC32 value from the array and the input data.

         static int CreateCRC32( struct dsc$descriptor *InputDataDesc )
           {
           uint32 AUTODIN2;
           uint32 Seed = ~0UL;
           uint32 Coefficient = 0x0EDB88320UL;
           uint32 CRCArray[16];

           lib$establish( lib$sig_to_ret );

           lib$crc_table( (void *) &Coefficient, (void *) CRCArray );
           AUTODIN2 = lib$crc( (void *) CRCArray, (void *) &Seed, InputDataDesc );
           AUTODIN2 ^= Seed;

           return AUTODIN2;
           }

         __________________________________________________________
         10.30  Enabling built-in tracing?

                  $ RUN SYS$SYSTEM:SYSMAN
                  SYSMAN> SYS_LOAD ADD TR$DEBUG TR$DEBUG/LOAD_
         STEP=INIT/LOG
                  SYSMAN> Exit
                  $ @SYS$UPDATE:VMS$SYSTEM_IMAGES.COM

                  To stop it from loading early in boot

                  $  RUN SYS$SYSTEM:SYSMAN
                  SYSMAN> SYS_LOAD REMOVE TR$DEBUG TR$DEBUG/LOG
                  SYSMAN> Exit
                  $ @SYS$UPDATE:VMS$SYSTEM_IMAGES.COM

                                                                    10-31







                  OpenVMS Programming Information




                  The first occurance of the name TR$DEBUG within the
                  command is considered the "product" and the second
                  is considered the "image" that should exist within
                  SYS$LOADABLE_IMAGES.

                  When TR$DEBUG loads in the init phase, it will
                  automatically turn on tracing.

                  Also see the SDA TR extension.



































                  10-32












                  _______________________________________________________

         11       DECwindows



         __________________________________________________________
         11.1  How do I let someone else display something on my
               workstation?

                  On a workstation, you will want to use the "Customize"
                  menu of the session manager utility and select
                  "Security". When the pop-up box appears, you can
                  select the host node, username, and tranport that will
                  allow you to launch an application that targets the
                  workstation display.

                  If this does not provide you with access to the
                  display, You need a checklist of sorts:

                  o  Make sure that you've specified the X-windows
                     "display" correctly on the remote host. For a
                     DECnet transport, the specification uses two colons,
                     while the TCP/IP transport typically uses one. The
                     X Windows server and the X Windows screen follow
                     the host specification, delimited by a period. For
                     example:

         ________________________________________________________________
         Table 11-1  X Windows Display Commands

                  _______________________________________________________
                  Shell_____Command______________________________________

                  csh

                            # setenv DISPLAY vms.domain:0.0

                  sh and ksh

                            # $ DISPLAY=vms.domain:0.0 ; export DISPLAY

                  DCL

                            $ SET DISPLAY/CREATE/NODE=vms.domain -
         ___________________/TRANSPORT=TCPIP/SERVER=server/SCREEN=screen_

                  o  If you have verified the command is correct and
                     things are still not working, ensure the Security
                     settings on the OpenVMS host side will allow the

                                                                     11-1







                  DECwindows




                     incoming connection: Pull down the "Options" menu
                     in the Session Manager, and select "Security...". If
                     you do not find your host and username and transport
                     listed among the authorized users, you will need to
                     add an entry.

                    o  There are various transports available, including
                       LOCAL, DECNET, LAT, and TCPIP. You must Select
                       the transport appropriate to the incoming
                       connection.

                    o  If the transport is "DECnet", do NOT add the
                       double colon (::) to the node name.

                    o  If the transport is "TCPIP", "Username" must
                       be an asterisk (*). Why? Because unlike DECnet,
                       the TCP/IP protocol does not provide the remote
                       username information in the incoming connection.

                    o  If the connection is "TCPIP", it is best to use
                       a full domain name (e.g. Node.Subd.Domain).
                       However, you may have to use the IP address
                       itself, if your host does not have a way to
                       resolve the address via DNS. If you have the
                       luxury of fixed addresses (eg: you are not using
                       DHCP), then it can be helpful to add two entries
                       for each TCP/IP host, one that specifies the host
                       name and one that specifies the host address.

                    o  There are various TCP/IP packages for OpenVMS,
                       and you must use syntax appropriate to the
                       transport installed.

                    o  If a TCP/IP connection is still not working,
                       ensure that the transport you want has been
                       activated for use with DECwindows. See
                       Section 11.14 for details of configuring TCP/IP
                       as a transport.

                  o  There is a log file created in SYS$MANAGER: which
                     can tell you which transports are loaded, and
                     also tell you what connect attempts were rejected,
                     including showing what the presented credentials
                     were. This file is SYS$MANAGER:DECW$SERVER_0_
                     ERROR.LOG, although the 0 could be another number
                     if you have multiple servers on the workstation. I

                  11-2







                  DECwindows




                     have found this file to be very useful for tracking
                     down what needs to be put in the Session Manager
                     Security entries.

         __________________________________________________________
         11.2  How do I create a display on another workstation?

                  To create a display from an OpenVMS host to a remote X
                  Windows display, use one of the following DCL commands:

                  $ SET DISPLAY /CREATE /TRANSPORT=net_transport /NODE=remote_node
                  $ SET DISPLAY /CREATE /TRANSPORT=LAT /NODE=remote_node
                  $ SET DISPLAY /CREATE /TRANSPORT=DECnet /NODE=remote_node
                  $ SET DISPLAY /CREATE /TRANSPORT=TCPIP /NODE=remote_node

                  Note that LAT is typically used only for the VXT series
                  X Windows terminals, but it can also be used from
                  OpenVMS to OpenVMS systems on various OpenVMS releases,
                  such as on OpenVMS Alpha V6.1 and later. For details on
                  configuring the TCP/IP transport, see Section 11.14.

                  If you are interested in X Windows terminals and have
                  an older VAXstation system around, please see the EWS
                  package on Freeware V5.0.

         __________________________________________________________
         11.3  How can I get the information from SHOW DISPLAY into a
               symbol?

                  Use the undocumented SHOW DISPLAY/SYMBOL, and then
                  reference the symbols DECW$DISPLAY_NODE, DECW$DISPLAY_
                  SCREEN, DECW$DISPLAY_SERVER and/or DECW$DISPLAY_
                  TRANSPORT.

                  An example of calling the underlying (and also
                  undocumented) sys$qio programming interface for the
                  WSDRIVER (WSAn:) is available at:

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

         Look in the Freeware V4.0 directory /srh_examples/DECUS_UNDOC_
         CLINIC/.


                                                                     11-3







                  DECwindows



         __________________________________________________________
         11.4  How do I get a log of a DECterm session?

                  If you are working from a DECwindows DECterm terminal
                  emulator, you can use the AutoPrint feature. Choose
                  the "Printer..." menu item from the "Options" menu, set
                  the printing destination to the name of the file you
                  want, and set "Auto Print Mode". You are now free to
                  continue.

                  It should be noted that all of the characters and
                  escape sequences are captured, but if you display the
                  resulting log file on a DECterm, then you will see
                  exactly what was originally displayed.

                  You can also use the "Print Screen" screen capture
                  available in the DECwindows session manager menus, if
                  you simply wish to snapshot a particular portion of the
                  X Windows display.

                  If you are using the Freeware VTstar terminal emulator
                  package, you will find a similar logging mechanism is
                  available in the menus.

         __________________________________________________________
         11.5  Why is DECwindows Motif not starting?

                  First check to see if there is a graphics device,
                  usually a G* device. (eg: On a DEC 2000 model 300,
                  use the command SHOW DEVICE GQ) If you do not find a
                  graphics device:

                  o  OpenVMS has failed to find the appropriate IRQ
                     information for an EISA graphics card (on the
                     DEC 2000 series) such as the HP (Compaq) QVision,
                     and did not autoconfigure it. Run the correct ECU
                     (for Tru64 UNIX and OpenVMS) and reboot. This is
                     necessary only on EISA-based systems.

                  o  You have an EISA-based system (such as the DEC
                     2000 model 300) and do not have a HP (Compaq)
                     QVision video card. This EISA graphics card should
                     have Compaq printed on it, and identifies itself
                     as a CPQ3011 or a CPQ3111. If it is not one of
                     these two EISA devices, then OpenVMS does not
                     support it. (There are no other supported EISA
                     graphics controllers, and EISA graphics are normally

                  11-4







                  DECwindows




                     used with DECwindows only on the DEC 2000 series
                     systems.)

                  o  You have a PCI-based system, and do not have a
                     supported graphics controller-examples of supported
                     controllers include the following:

                    o  Radeon 7500

                    o  PowerStorm 3D30, PowerStorm 4D20

                    o  3DLabs Oxygen VX1

                     See Section 5.16 for further information on some of
                     these graphics controllers.

                  o  You have booted the system minimally, or have
                     otherwise disabled the device autoconfiguration
                     process.

                  If there is a G* graphics device present:

                  o  There may have been a severe error in the
                     DECwindows startup. Type the contents of
                     SYS$MANAGER:DECW$SERVER_0_ERROR.LOG for any
                     information on errors starting the server.

                  o  The system parameter WINDOW_SYSTEM is not set to
                     1. While this was a common way for system managers
                     to disable the DECwindows server startup, it is
                     not particularly reliable as DECwindows can now
                     "correct" this setting.

                     If you really do not want an OpenVMS system with
                     workstation hardware to bootstrap and configure
                     itself as a workstation, add the following
                     definition to SYLOGICALS.COM:

                     $ DEFINE/SYSTEM/EXEC DECW$IGNORE_WORKSTATION TRUE

                  o  You may not have a valid DECwindows Motif license
                     loaded. To check for the two most common types of
                     Motif product authorization keys (PAKs), use the
                     following DCL commands:

                     $ LICENSE LIST DW-MOTIF/FULL
                     $ LICENSE LIST NET-APP-SUP*/FULL

                                                                     11-5







                  DECwindows




                     and examine the information displayed. Make sure
                     that one of these licenses is present, valid and
                     active.

                     For information on registering software license
                     product authorization keys (PAKs) when you
                     cannot log into the system directly, please see
                     Section 5.6.2.

                  o  Check that the DECW$PRIVATE_SERVER_SETUP.COM is
                     correct for the graphics controller in use. For
                     instance:

                     The following is from the 9FX Vision 330 Owners
                     Guide, EK-V330G-OG pg 2-9. Place the following in
                     DECW$PRIVATE_SERVER_SETUP.COM, creatibng .COM from
                     .TEMPLATE if necessary. Locate the DECW$PRIVATE_
                     SERVER_SETUP.COM file in SYS$SPECIFIC:[SYSMGR] or
                     in SYS$COMMON:[SYSMGR] as appropriate; the former
                     file is used for this system within a cluster
                     configuration, and the latter is used for all
                     systems that do not also have a local copy of this
                     file in SYS$SPECIFIC:[SYSMGR].

                     $ DECW$XSIZE_IN_PIXELS == xvalue
                     $ DECW$YSIZE_IN_PIXELS == yvalue
                     $ DEFINE/SYSTEM DECW$SERVER_REFRESH_RATE rate_in_Hz

                     Also see Section 11.11. Details of the PowerStorm
                     3D30 and 4D20 settings are available in the OpenVMS
                     Ask The Wizard area.

         __________________________________________________________
         11.6  How do I set the title on a DECterm window?

                  If you are creating a new DECterm window, check

                  $ HELP CREATE /TERMINAL /WINDOW_ATTRIBUTES

                  If you want to change the title of an existing window,
                  use the following control sequences, where <esc> is the
                  ANSI escape code, value decimal 27, and "text label" is
                  what you want to display:

                  To set the DECterm title, send the escape character,
                  then the characters "]21;", then the text label string,
                  and then an escape character followed by a backslash
                  character.

                  11-6







                  DECwindows




                  To set the icon label, send the escape character, then
                  the characters "]2L;", then the icon label string,
                  and then an escape character followed by a backslash
                  character.

                  To set both the DECterm title and icon to the full
                  device name, you can use the following DCL commands:

         $  esc[0,7] = 27
         $  fulldevnam = F$Edit(F$GetDVI("TT","FULLDEVNAM"),"UPCASE,COLLAPSE")
         $  write sys$output esc+ "]21;" + fulldevnam + esc + "\"
         $  write sys$output esc+ "]2L;" + fulldevnam + esc + "\"

                  You can also change the title and the icon using the
                  Options-Window... menu.

                  Also see Section 12.1 and Section 8.13.

         __________________________________________________________
         11.7  How do I customize DECwindows, including the login screen?

                  To customize various DECwindows Motif characteristics
                  including the defaults used by the SET DISPLAY command,
                  the DECwindows login screen background logo used (the
                  default is the DIGITAL, Compaq, or HP logo), various
                  keymaps (also see Section 11.7.2 and Section 11.7.1),
                  the FileView defaults, session manager defaults,
                  the DECwindows login processing, DECwindows log file
                  processing, and various other DECwindows attributes,
                  see the example file:

                  $ SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE

                  This example template file is typically copied over to
                  the filename SYS$COMMON:[SYSMGR]DECW$PRIVATE_APPS_
                  SETUP.COM and then modified to meet site-specific
                  requirements.

                  Additionally, various X tools such as xsetroot, bitmap
                  and xrdb-some these can be useful in customizing the
                  appearance of an application or of the DECwindows Motif
                  display-are provided in the DECW$UTILS: area.

                  When using DECwindows V1.2-4 and later on OpenVMS
                  Alpha, the default desktop is the Common Desktop
                  Environment (CDE). You can select your preferred
                  desktop (CDE or DECwindows Motif) when logging in,
                  or you can change the default to the DECwindows

                                                                     11-7







                  DECwindows




                  Motif desktop using the DCL symbol decw$start_new_
                  desktop in the DECwindows private application setup
                  command procedure. See SYS$MANAGER:DECW$PRIVATE_APPS_
                  SETUP.TEMPLATE for further details, and how to create
                  DECW$PRIVATE_APPS_SETUP.COM.

                  Note that with DECwindows CDE, the root window is
                  no longer visible by default. The root window is
                  hidden behind the "backdrop" window of the current
                  CDE workspace. To make the root window visible, use the
                  CDE style manager selection "backdrop none", and use
                  information such as that in the OpenVMS FAQ to set the
                  root window.

                  To add a new backdrop to the DECwindows CDE
                  environment, the backdrop must first be in or be
                  converted into X11 pixmap format. (This conversion
                  is often possible using tools such as xv.) Then (if
                  necessary) create the default backdrop directory
                  SYS$COMMON:[CDE$DEFAULTS.USER.BACKDROPS]. Place the
                  X11 pixmap file containing the desired image into the
                  backdrops directory, ensure that it has a filename
                  extension of .PM. (The xv default filename extension
                  for the X11 pixmap file is .XPM, while CDE expects
                  only to see files with .PM.) Now invoke the CDE style
                  manager and select a new backdrop. You will find
                  your image will be placed at the end of the list of
                  backdrops available.

                  If you require a message be included on the initial
                  display-where the start session display and the logo
                  appears-you can use either of the following approaches:

                  o  The simplest approach requires OpenVMS V7.3-2 or
                     later, and the corresponding DECwindows V1.3-
                     1 kit or later. You will want to create a file
                     named SYS$COMMON:[SYSMGR]DECW$GREET.TXT, and this
                     will be displayed in a popup-with an OK button-
                     when the login box is displayed. This is intended
                     specifically for applications requiring such a
                     display.



                  11-8







                  DECwindows




                  o  The second approach involves copying the file
                     XRESOURCES.DAT from

                     SYS$SYSDEVICE:[VMS$COMMON.CDE$DEFAULTS.SYSTEM.CONFIG.C]

         into the directory

                     SYS$SYSDEVICE:[VMS$COMMON.CDE$DEFAULTS.USER.CONFIG.C]

         and editing the copy. Specifically, look for the following:

                     Dtlogin*greeting.labelString:

                     The line is normally commented out, and by default
                     contains the string:

                     Welcome to %localhost%

                     You can change this text to something akin to the
                     following:

         Dtlogin*greeting.labelString:  Welcome to Heck \n\
         This is a Trusted System owned by the Rulers of the planet Zark\n\
         \n\
         We Come In Peace\n\
         \n
         If you want Privacy, you've come to the wrong place\n\
         \n

                     The lines of text will be centered for you.

                     In most DECwindows versions, you will be able to
                     onbtain only about eight (8) lines of text. Changes
                     have been implemented in DECwindows V1.3 and later
                     that permit up to about twenty-five (25) lines of
                     text.

                  The login logo is stored as an XPM bitmap image in the
                  text file SYS$SYSROOT:[SYSCOMMON.CDE$DEFAULTS.SYSTEM.APPCONFIG.ICONS.C]DECDTLOGO.PM,
                  and it can be changed. Copy the file to SYS$SYSROOT:[SYSCOMMON.CDE$DEFAULTS.USER.APPCONFIG.ICONS.C]DECDTLOGO.PM,
                  as DECwindows upgrades can replace the system version
                  of this file.

                  On DECwindows V1.3-1 and later (and possibly on V1.3),
                  both DECwindows CDE and DECwindows Motif displays use
                  this logo file. On older releases, only the DECwindows
                  CDE displays used this logo file, while the logo
                  used for the Motif login display was hard-coded into
                  the package and the only available override is the

                                                                     11-9







                  DECwindows




                  DECW$LOGINLOGO command procedure mechanism within the
                  customized, site-specific DECW$PRIVATE_APPS_SETUP.COM
                  file.

                  Look at the contents of the DECDTLOGO.PM file and at
                  other *.XPM files and tools for additional details.

         _____________________________
         11.7.1  How do I customize DECwindows keymapping?

                  Various keymaps can be implemented on OpenVMS and other
                  X Windows systems, allowing the implementation of
                  a Dvorak-style or other alternate keymappings. For
                  details, see the available X Windows documentation
                  (this is the documentation associated with X Windows
                  itself, and not the product documentation for the
                  OpenVMS operating system nor for the DECwindows
                  X Windows implementation) and see the DECwindows
                  *.DECW$KEYMAP (text-format) files found in the
                  DECwindows DECW$KEYMAP: directory.

                  For other keymapping information, see Section 11.7.2.

         _____________________________
         11.7.2  Why does the DELETE key delete forward instead of
                 backward?

                  See the SET TERMINAL/BACKSPACE command on OpenVMS V8.2
                  and later.

                  This behaviour involves the Motif virtual key bindings.
                  When a Motif application starts, it looks at the vendor
                  string returned in the display connection information
                  and attempts to match the string to a table of virtual
                  bindings.

                  You can override the default bindings in your
                  decw$xdefaults.dat file. Here is the entry you would
                  make to get the default VMS bindings.





                  11-10







                  DECwindows




                  *defaultVirtualBindings:\
                   osfCancel :  <F11> \n\
                   osfLeft :  <Left> \n\
                   osfUp  :  <Up> \n\
                   osfRight :  <Right> \n\
                   osfDown :  <Down> \n\
                   osfEndLine :Alt  <Right> \n\
                   osfBeginLine :Alt  <Left> \n\
                   osfPageUp :  <Prior> \n\
                   osfPageDown :  <Next> \n\
                   osfDelete :Shift  <Delete> \n\
                   osfUndo :Alt  <Delete> \n\
                   osfBackSpace :  <Delete> \n\
                   osfAddMode :Shift  <F8> \n\
                   osfHelp :  <Help> \n\
                   osfMenu :  <F4> \n\
                   osfMenuBar :  <F10> \n\
                   osfSelect :  <Select> \n\
                   osfActivate :  <KP_Enter> \n\
                   osfCopy :Shift  <DRemove> \n\
                   osfCut  :  <DRemove> \n\
                   osfPaste :  <Insert>

                  To merge:

                  $ xrdb :== $decw$utils:xrdb.exe
                  $ xrdb -nocpp -merge decw$xdefaults.dat

                  Also note that the DECW$UTILS:DECW$DEFINE_UTILS.COM
                  procedure can be used to establish the xrdb and other
                  symbols.

                  Also see the DECxterm directory of Freeware V5.0 for
                  details on connecting to OpenVMS from various UNIX
                  platforms.

                  For other keymapping information, see Section 11.7.1.







                                                                    11-11







                  DECwindows



         __________________________________________________________
         11.8  Why doesn't XtAppAddInput() work on OpenVMS?

                  Yes, XtAppAddInput()  does work on OpenVMS. The MIT
                  definition of the X Windows call XtAppAddInput()
                  includes platform-specific arguments.

                  On platforms where C is the typically the primary
                  programming language for the platform, the file
                  descriptor mask is one of the arguments to the
                  XtAppAddInput()  call.

                  On OpenVMS, the platform-specific arguments to this
                  call include an event flag and an IOSB, as these are
                  the traditional OpenVMS constructs used to synchronize
                  the completion of asynchronous operations. While it
                  would be easier to port non-OpenVMS C code that calls
                  XtAppAddInput()  over to OpenVMS if the arguments
                  included the C file descriptor, this would make the
                  call unusable from other OpenVMS languages, and would
                  make it extremely difficult to use OpenVMS features
                  such as ASTs and sys$qio calls.

                  One restriction on the event flag: the event flag
                  chosen must be from event flag cluster zero. When using
                  the traditional lib$get_ef and lib$free_ef calls to
                  allocate and deallocate event flags, you must first
                  explicitly call lib$free_ef to free up some event flags
                  in event flag cluster zero. Please see the event flag
                  documentation for specific details on these calls and
                  for specific event flags that can be freed in event
                  flag cluster zero.

                  Here is some example code that covers calling this
                  routine on OpenVMS:










                  11-12







                  DECwindows




                      m->InputID = XtAppAddInput(
                          m->AppCtx,
                          m->InputEF,
                          m->InputIosb,
                          the_callback, 1 );
                      if ( !((int) m->InputID ))
                          {
                          XtAppErrorMsg(
                              m->AppCtx,
                              "invalidDevice",
                              "XtAppAddInput",
                              "XtToolkitError",
                              "Can't Access Device",
                              (String *) NULL,
                              (Cardinal *) NULL );
                          ...

         __________________________________________________________
         11.9  Why do the keyboard arrow keys move the DECwindows cursor?

                  Congratulations, you have just stumbled into "dead
                  rodent" mode. This DECwindows environment-where the
                  keyboard arrow keys move the mouse cursor and where
                  the [SELECT], [PREV], and [NEXT] keys emulate the three
                  mouse buttons-allows rudimentary system operations when
                  the mouse is among the casualties.

                  To enter or exit "dead rodent" mode, enter the
                  following: <CTRL/SHIFT/F3>

         __________________________________________________________
         11.10  Why does half my DECwindows display blank?

                  This is likely a result of receiving an OPCOM or other
                  console message on a system that shares the system
                  console with the DECwindows graphics workstation
                  display.

                  You can toggle off the console display window using
                  <CTRL/F2> and you can enable a serial console per
                  Section 14.3.6 or Section 14.3.3.3.



                                                                    11-13







                  DECwindows




                  Also see the console message window application
                  available with recent DECwindows versions-DECwindows
                  versions V1.2-3 and later will enable this window
                  by default. For details on this console message
                  window, see the DECW$CONSOLE_SELECTION option in
                  SYS$STARTUP:DECW$PRIVATE_APPS_SETUP.TEMPLATE.

                  On older releases, you can disable output using the
                  following:

                  $ SET TERMINAL/PERMANENT/NOBROADCAST OPA0:
                  $ DEFINE/USER SYS$COMMAND OPA0:
                  $ REPLY/DISABLE

                  Also see Section 14.3.3.2, Section 14.17, and Also see
                  Section 8.4,

         __________________________________________________________
         11.11  %DECW-W-NODEVICE, No graphics device found on this
                system?

                  To resolve the following error:

                  %DECW-W-NODEVICE, No graphics device found on this system
                  -DECW-I-NODECW, DECwindows graphics drivers will not be loaded

                  o  Ensure that the system parameter WINDOW_SYSTEM is
                     set to 1. If it is not set to a value of 1, issue
                     the commands:

                     $ run sys$system:sysgen
                     USE CURRENT
                     SET WINDOW_SYSTEM 1
                     WRITE ACTIVE
                     WRITE CURRENT
                     EXIT

                     Then reboot the system.

                  o  On OpenVMS Alpha, ensure the SYSMAN IO PREFIX LIST
                     is set correctly, and specifically ensure the DECW$
                     prefix is included in the existing list. If it is
                     not, you will need to add it:

                  11-14







                  DECwindows




         $ run sys$system:sysman
         IO SHOW PREFIX
         IO SET PREFIX=(DECW$,*)   * = list returned by the show command
         IO AUTO/LOG
         EXIT

                  o  Ensure that the image SYS$SHARE:DECW$ICBM.EXE is
                     installed in memory. If it is not installed, then
                     install it:

         $ INSTALL LIST/FULL SYS$SHARE:DECW$ICBM
         $ INSTALL REPLACE SYS$SHARE:DECW$ICBM
         $ EDIT SYS$MANAGER:SYCONFIG.COM

         $! The following line was added to install
         $! support for the Mach64 Graphics Card
         $!
         $ INSTALL REPLACE SYS$SHARE:DECW$ICBM
         $ ^Z

                     Then reboot the system.

                     The ICBM mechanism is not used on and not needed by
                     more recent DECwindows versions.

                  o  If the system still complains "%DECW-W-NODEVICE, No
                     graphics device found on this system", then:

                    o  Boot the system as normal

                    o  Login as SYSTEM.

                    o  Create the file SYS$COMMON:[SYSMGR]DECW$USER_
                       AUTOCONFIG.DAT. Protection must permit world read
                       access.

                    o  Add the following string on the very first line:

         CLEAR_PFLAG = ISA_4BYTE

                    o  Save the file

                    o  Set the file protections

         $ SET PROTECTION=W:RE SYS$MANAGER:DECW$USER_AUTOCONFIG.DAT

                    o  Reboot the system

                  Also see Section 11.5.

                                                                    11-15







                  DECwindows



         __________________________________________________________
         11.12  How can I reset the warning bell volume?

                  With DECwindows CDE drivers and ECOs starting with ECOs
                  for the DECwindows keyboard driver SYS$IKBDRIVER.EXE
                  in OpenVMS Alpha V7.1-2 and V7.2-1 and with the
                  SYS$IKBDRIVER.EXE included in OpenVMS V7.2-1H1 and
                  later, the DECwindows CDE controls will now correctly
                  manage the setting of the warning bell volume.

                  Unfortunately, the equivalent controls in the older
                  DECwindows Motif interface are not compatible and can
                  no longer manage the warning bell volume.

                  If you need to manage the volume with DECwindows Motif,
                  consider using the following approach:

                  $ @decw$utils:decw$define_utils
                  $ xset b 1 100 100

                  The numerics are the volume, pitch, and duration,
                  respectively.

                  Why? When OpenVMS first started supporting the PC-style
                  keyboards, the X Windows Server and the keyboard driver
                  interface did not support the pitch and duration, and
                  neither did DECwindows Motif. The DECwindows keyboard
                  driver was accordingly changed to use the volume from
                  the keyclick setting (keyclick is not available in
                  a PC-style keyboard) and the bell volume setting to
                  control the pitch and duration.

                  DECwindows CDE does provide sliders for setting pitch
                  and duration, so the keyboard driver and X Windows
                  Server were modified to provide all of the information,
                  and now the DECwindows CDE sliders work. This change is
                  unfortunately incompatible with the old scheme used on
                  the pre-CDE desktops, and the volume controls are now
                  incompatible with the current keyboard drivers. Hence
                  the use of xset.





                  11-16







                  DECwindows



         __________________________________________________________
         11.13  How can I alter the DECwindows CDE backdrop?

                  To select a separate backdrop to be displayed on each
                  screen using DECwindows CDE:

                  o  Click on the Application Manager. This is the drawer
                     icon on the CDE toolbar.

                  o  Click on Desktop Tools

                  o  Click on Set Default Screen and select the required
                     screen

                  o  Click on the Style Manager. This is the one
                     containing the mouse and ttt on the CDE toolbar

                  o  Now change the background.

         __________________________________________________________
         11.14  How can I enable the DECwindows TCP/IP Transport

                  To configure the TCP/IP transport for DECwindows,
                  first ensure that a TCP/IP package is installed and
                  configured. Then set the DCL symbol DECW$SERVER_
                  TRANSPORTS in SYS$MANAGER:DECW$PRIVATE_SERVER_
                  SETUP.COM to the appropriate local value, based on
                  the comments in that file. If you do not have a copy of
                  SYS$STARTUP:DECW$PRIVATE_SERVER_SETUP.COM, the use the
                  following COPY command to create this file based on the
                  provided template file:

         $ COPY SYS$MANAGER:DECW$PRIVATE_SERVER_SETUP.TEMPLATE -
         $_ SYS$COMMON:[SYSMGR]DECW$PRIVATE_SERVER_SETUP.COM

         __________________________________________________________
         11.15  Can I use DECwindows 1.2-* on OpenVMS V7.3-2 or later?

                  The short answer is no.

                  OpenVMS Alpha V7.3-2 only supports DECwindows Motif
                  V1.3 and later. If you require DECwindows V1.2-6 or
                  earlier, then you are limited to operations on OpenVMS
                  Alpha V7.3-1 and earlier releases.

                  The central technical reason involves depdendencies
                  among the parts of the X11 subsystem that are delivered
                  with the base OpenVMS operating system including the X
                  Windows display server and the transport images, and

                                                                    11-17







                  DECwindows




                  the parts of the DECwindows product that are delivered
                  within the DECwindows installation kits including the
                  client libraries and the DECwindows applications.

                  DECwindows V1.3 and later made substantial changes to
                  the transport layer, and these required corresponding
                  changes to both the associated client and server code.
                  OpenVMS Alpha V7.3-2 includes the server and transport
                  with the V1.3 modifications. These changes were in
                  support of the upgrade of Xlib from X11R5 to X11R6.6,
                  and transport-level changes associated with support of
                  the Kerberos and LBX features.

                  If you attempt to load DECwindows V1.2-6 images onto an
                  OpenVMS Alpha V7.3-2 or later system, the DECwindows
                  libraries will not function with with system images
                  and will particularly not function with the transport
                  layer.

         __________________________________________________________
         11.16  How to add Fonts into DECwindows?

                  The following assumes DECwindows V1.3-1 and OpenVMS
                  Alpha V7.3-2 and later unless stated otherwise, and can
                  permit fonts of various formats to be added into the
                  DECwindows environment.

                  The recommended location for user font files is to
                  place them in the directories which are reserved
                  for this purpose, typically located below the
                  SYS$COMMON:[SYSFONT.DECW] directory.

                  SYS$COMMON:[SYSFONT.DECW.USER_100DPI]
                  SYS$COMMON:[SYSFONT.DECW.USER_75DPI]

                  The above are recommended for PCF files of 100 Dots Per
                  Inch (DPI) and of 75 DPI resolution, respectively.

                  SYS$COMMON:[SYSFONT.DECW.USER_COMMON]

                  The above is recommended for other PCF files, such
                  as terminal (character cell) fonts, and fonts used by
                  specific applications.

                  SYS$COMMON:[SYSFONT.DECW.USER_CURSOR16]
                  SYS$COMMON:[SYSFONT.DECW.USER_CURSOR32]

                  11-18







                  DECwindows




                  The above are recommended for cursors.

                  SYS$COMMON:[SYSFONT.DECW.USER_SPEEDO]

                  SPEEDO is recommended for SPD files.

                  SYS$COMMON:[SYSFONT.DECW.USER_TRUETYPE]

                  USER_TRUETYPE is recommended for TrueType (TTF)
                  fonts. Fonts placed in this directory should be in
                  the "Windows / Linux" format.

                  The directory will contain the font files themselves,
                  and a data file that describes each font in the
                  directory. This file is named DECW$FONT_DIRECTORY.DAT
                  or DECW$FONT_DIRECTORY_extension.DAT, where "extension"
                  is replaced by the type of font (100DPI, SPEEDO,
                  TRUETYPE, TYPE1, etc.)

                  Make sure that the file protection on the font files is
                  set to allow world access to the fonts.

                  For example: to add TrueType fonts to DECwindows,
                  place the font files in SYS$COMMON:[SYSFONT.DECW.USER_
                  TRUETYPE]

                  A directory listing might look like this:

         Directory SYS$COMMON:[SYSFONT.DECW.USER_TRUETYPE]

         ARKOI8N.TTF;1                            46KB/48KB        5-MAR-1995 04:00:00.00
         backstage.ttf;1                          55KB/56KB       19-JUL-2004 09:42:20.92
         IDAutomationHC39M_Free.ttf;1             27KB/32KB       29-JUL-2003 11:25:48.00
         ...
         texsi.ttf;1                             133KB/136KB      25-MAY-2003 15:31:11.00
         texw.ttf;1                              150KB/152KB      25-MAY-2003 15:32:33.00

         Total of 37 files, 3.09MB/3.23MB

                  The case of the filename is not important.

                  TrueType fonts should be in Stream_LF file format.

                  To generate the appropriate DECW$FONT_DIRECTORY.DAT
                  file for most font formats, issue the command:

                  $ FONTCOMPILER /DIRECTORY

                                                                    11-19







                  DECwindows




                  The above may or may not operate with TrueType files,
                  and you will likely have to generate the DECW$FONT_
                  DIRECTORY_TRUETYPE.DAT file manually. A sample file
                  follows:

         37
         BACKSTAGE.ttf -Grfonts-Backstage-bold-r-normal--0-0-0-0-p-0-iso8859-1
         IDAutomationHC39M_Free.ttf -IDAutomation-HC39M-medium-r-normal--0-0-0-0-m-0-misc-Barcode39
         SUSESerif-Bold.ttf -Suse-Suse-bold-r-normal--0-0-0-0-p-0-iso8859-1
         SUSESerif-Roman.ttf -Suse-Suse-medium-r-normal--0-0-0-0-p-0-iso8859-1
         SUSESans-Bold.ttf -Suse-Suse-bold-r-normal-sans-0-0-0-0-p-0-iso8859-1
         SUSESans-BoldOblique.ttf -Suse-Suse-bold-o-normal-sans-0-0-0-0-p-0-iso8859-1
         SUSESans-Oblique.ttf -Suse-Suse-medium-o-normal-sans-0-0-0-0-p-0-iso8859-1
         SUSESans-Roman.ttf -Suse-Suse-medium-r-normal-sans-0-0-0-0-p-0-iso8859-1
         SUSESansMono-Bold.ttf -Suse-Suse Mono-bold-r-normal-sans-0-0-0-0-m-0-iso8859-1
         ...
         MCTIMEBI.TTF -UOregon-MAC C Times-bold-i-normal--0-0-0-0-p-0-macedonian-0
         MCTIMEI.TTF -UOregon-MAC C Times-medium-i-normal--0-0-0-0-p-0-macedonian-0

                  The first line of this data file is the number of
                  font file entries which follow. Each entry consists
                  of the font file name, and a font description. There
                  are fourteen fields in the description, separated by
                  hyphens (dashes, "-"). Fields may contain embedded
                  spaces. The fields are

                  o  Foundry: the name of the company or person which
                     produced the font.

                  o  Family: the name of the Typeface (what most people
                     will call the "font").

                  o  Weight: How "heavy" the type appears. Normal fonts
                     are "medium" or "regular", variations include
                     "bold", "demi", "light", etc.

                  o  Slant: "r" for regular, "i" for italic, or "o" for
                     oblique.

                  o  Width: "normal", "wide", "narrow", "condensed", etc.

                  o  Style: normally left empty, it can also identify
                     variations on a basic family such as "sans" (sans
                     serifs; without the serif, the ending and usually
                     pointed portion of the stroke). Fonts of different
                     styles can be grouped in the same family.

                  11-20







                  DECwindows




                  o  Sizes: the next four fields identify the size and
                     scale of individual characters for fonts that have
                     fixed point sizes. For fonts which scale (such as
                     TrueType), the four fields are all zero.

                  o  Spacing: "p" for proportional, "m" for monospaced,
                     or "c" for character cell.

                     Note: although DECwindows can identify different
                     spacings within a family, the author has found that
                     mixing monospaced and proportional fonts in the same
                     family may cause some proportional font options to
                     not appear in a font selection menu within Notepad
                     (only). (A fix for this is expected in DECwindows
                     V1.5 and later.)

                  o  The next field is always zero for TrueType fonts.

                  o  Character Set: the last two fields identify the name
                     and version number of the character set represented
                     within the font. For many applications, these fields
                     are informational only.

                  The next step is to update the list of fonts known to
                  DECwindows, using the xset utility.

                  $ mc decw$utils:xset fp rehash

                  It is also possible to reset the font list to the
                  default:

                  $ mc decw$utils:xset fp default

                  This is useful if you need to recover from errors.

                  The Notepad utility, normally available through the
                  "Applications" menu in Session Manager, is a convenient
                  way to see if the font is available. Start the
                  application, select "Options", then select "Font...".
                  In the "Family (Foundry)" window, you will see the
                  list of fonts available. User-added TrueType fonts will
                  normally be at the end of this list. Select the desired
                  font family, then select the Size (dpi) (which will
                  always be 0(0) for TrueType fonts), and the various
                  font options (Weight, Slant, Width, etc.) should appear
                  in the next window. You should then be able to select
                  the desired font and click <OK> or <Apply> to use it,
                  or <Cancel> to exit without changing the font.

                                                                    11-21







                  DECwindows




                  If you don't see all of the fonts you added, check to
                  see that the number at the beginning of the DECW$FONT_
                  DIRECTORY*.DAT file is correct, that the files are set
                  to world (or appropriate) access, and that TrueType
                  fonts are in Stream_LF format.

                  Some applications require entering a full font name,
                  which will look like the font description entry.

                  Please keep in mind that not all applications can use
                  every font which may be available on your system.
                  For example, DECterm is designed to use families
                  of fonts specifically designed for character cell
                  applications. Other fonts (specifically TrueType)
                  may work erratically, and may result in an unusable
                  display. It is best to use only monospaced fonts
                  specifically intended for DECterm with DECterm.

                  The SYS$COMMON:[SYSFONT.DECW.USER_TRUETYPE] doesn't
                  exist on OpenVMS VAX V7.3 with DECwindows V1.2-6,
                  but the procedure above does appear to work if the
                  directory is created and the instructions above are
                  followed.





















                  11-22












                  _______________________________________________________

         12       Miscellaneous Information



         __________________________________________________________
         12.1  Where can I find information on escape and control
               sequences?

                  Information on escape and control sequences can be
                  found in the OpenVMS I/O User's Reference Manual, in
                  the chapter on the terminal driver. The chapter also
                  includes details on the general format and content of
                  these sequences.

                  Specific details on the escape and control sequences
                  supported by a particular serial device are typically
                  found in the documentation provided with the specific
                  device. Information on the sequences supported by
                  DECwindows DECterm terminal emulator are included in
                  the DECwindows documentation.

                  Examples of common escape and control sequences-
                  those typically used by the OpenVMS screen management
                  package-can be found in the OpenVMS system file
                  SYS$SYSTEM:SMGTERMS.TXT. (This file can be queried
                  under program control using SMG$GET_TERM_DATA, and you
                  don't need to use all of SMG to use this call.)

                  The following refers to the function keys on the LK-
                  series keyboards found on the VT-series terminals such
                  as the VT220 and VT510, and the LK-series keyboards
                  found on the OpenVMS workstations, and the keyboards
                  found on compatible terminals. (Though note that the
                  keyboard itself does not generate the sequence, the
                  terminal or terminal emulator generates the sequence
                  in response to user input.) In the following, {CSI} is
                  decimal code 155 and can be replaced by the sequence
                  "{ESC}[" (without the quotes) particularly for seven-
                  bit operations, SS3 is decimal code 143 and can be
                  replaced by "{ESC}O" particularly for seven-bit
                  operations. Older VT1xx series terminals and any
                  other terminals operating with seven-bit characters

                                                                     12-1







                  Miscellaneous Information




                  should not be sent eight-bit operators such as {CSI}
                  and {SS3}.

         PF1={SS3}P PF2={SS3}Q PF3={SS3}R PF4={SS3}S
         KP0={SS3}p KP1={SS3}q KP2={SS3}r KP3={SS3}s KP4={SS3}t KP5={SS3}u
         KP6={SS3}v KP7={SS3}w KP8={SS3}x KP9={SS3}y KPCOMMA={SS3}l KPMINUS={SS3}m
         KPPERIOD={SS3}n ENTER={SS3}M DNARROW={CSI}B UPARROW={CSI}A LFARROW={CSI}D
         RTARROW={CSI}C FIND={CSI}1~ INSERT={CSI}2~ REMOVE={CSI}3~ SELECT={CSI}4~
         PREV={CSI}5~ NEXT={CSI}6~ F6={CSI}17~ F7={CSI}18~ F8={CSI}19~ F9={CSI}20~
         F10={CSI}21~ F11={CSI}23~ F12={CSI}24~ F13={CSI}25~ F14={CSI}26~
         HELP={CSI}28~ DO={CSI}29~ F17={CSI}31~ F18={CSI}32~ F19={CSI}33~ F20={CSI}34~

                  An example of working with escape sequences (in DCL)
                  follows:

                  $ esc5m = "*[5m"
                  $ esc5m[0,8] = 27
                  $ esc0m = "*[0m"
                  $ esc0m[0,8] = 27
                  $ write sys$output esc5m + "blinking text" + esc0m

                  Documentation on an ANSI terminal relatively similar to
                  the VT525 series is available at:

                  o  ftp://ftp.boundless.com/pub/text/adds/docs/260_prog/

                  o  ftp://ftp.boundless.com/pub/text/adds/docs/260_user/

                  Also see the various documentation and manuals
                  available at:

                  o  http://www.vt100.net/

                  Information on the ReGIS graphics character set is
                  available at:

                  o  http://www.cs.utk.edu/~shuford/terminal/dec_regis_
                     news.txt

                  Also:

                  o  http://www.boundless.com/Text_Terminals/VT/

                  Also see Section 11.6, Section 8.13.

                  12-2







                  Miscellaneous Information



         __________________________________________________________
         12.2  Does DECprint (DCPS) work with the LRA0 parallel port?

                  No.

                  The parallel printing port LRA0: found on many
                  OpenVMS Alpha systems is capable of some bidirectional
                  communications, with enough for basic operations with
                  most parallel printers.

                  DECprint (DCPS) requires more than just the simple
                  handshaking provided by the LRA0: port, therefore DCPS
                  does not work with the LRA0: port.

         __________________________________________________________
         12.3  How do I check for free space on a (BACKUP) tape?

                  You cannot know for certain, though you can certainly
                  estimate the remaining capacity.

                  Tape media is different than disk media, as disks
                  have a known and pre-determined fixed capacity. Modern
                  disks also appear logically perfect, based on bad block
                  revectoring support and the extra blocks hidden within
                  the disk structure for these bad block replacements.

                  The capacity of tape media is not nearly as pre-
                  determined, and the capacity can vary across different
                  tape media (slightly different media lengths or
                  different foil markers or other variations, for
                  instance) and even on the same media over time (as bad
                  spots in the media arise). Tapes can vary the amount of
                  recording media required, depending on the remaining
                  length of the tape, the numbers of correctable and
                  uncorrectable media errors that might occur, the
                  numbers and sizes of the inter-record gaps and related
                  tape structure overhead, the particular media error
                  recovery chosen, the tape density, the efficiently of
                  any data compression in use, and the storage overhead
                  required by BACKUP, tar, and other similar commands.

                  BACKUP using with the default settings results in
                  approximately 15% overhead, in terms of saveset size.
                  (eg: Assuming a 500 KB input, the total size would be
                  575 KB.)

                  Assuming no compression:
                  4 GB media / 575 KB saveset = 7294 savesets

                                                                     12-3







                  Miscellaneous Information




                  Assuming 1:2 compression:
                  8 GB media / 575 KB saveset = 14588 savesets

                                            Note

                     There are no inter-record gaps on DAT tapes. When
                     determining media capacity, you have to consider
                     these gaps with nine-track magtape media and
                     other formats with gaps. This is not the case
                     with DAT (DDS), as the format has no recording
                     gaps. However, the block structure underneath
                     the variable length record recording is based on
                     a block size of circa 124 KB. Further, writing
                     doubles filemarks and such can cause a loss of
                     up to the underlying block size. Thus even though
                     there are no inter-record gaps on DAT, larger
                     savesets are still usually best.

                  The compression algorithms used on various devices are
                  generally not documented-further, there is no way to
                  calculate the effective data compression ratio, the
                  tape mark overhead, and similar given just the data
                  to be stored on tape-short of actually trying it, of
                  course.

                  A typical compression ratio found with "everyday" data
                  is somewhere around 1:1.8 to 1:2.

                                            Note

                     OpenVMS often uses the term COMPACTION for
                     compression control, as in the qualifier /MEDIA_
                     FORMAT=COMPACTION.

         __________________________________________________________
         12.4  Correctly using license PAKs and LMF?

                  If you have multiple LMF$LICENSE.LDB databases in
                  your OpenVMS Cluster, then each and every PAK must
                  be installed in each and every license database present
                  in an OpenVMS Cluster. Even if you use /EXCLUDE or
                  /INCLUDE, you need to have a consistent set of PAKs
                  registered across all licensing databases present in
                  the OpenVMS Cluster.

                  12-4







                  Miscellaneous Information




                  If your software license permits it, you can use the
                  following two commands to transfer license PAKs:

                  $ LICENSE COPY...
                  $ LICENSE ISSUE/PROCEDURE/OUTPUT=file product,...

                  To display the particular license(s) required (such as
                  when you receive a NOLICENSE error), use the following
                  DCL sequence:

                  $ SET PROCESS/PRIVILEGE=ALL
                  $ REPLY/ENABLE
                  $ DEFINE/SYSTEM/EXECUTIVE LMF$DISPLAY_OPCOM_MESSAGE

                  This logical name will cause all license failures
                  to generate OPCOM messages, and this will hopefully
                  show which license(s) you need- there may well also
                  be additional license failures displayed, as various
                  products can check for and can be enabled by multiple
                  license PAKs. You will want to deassign this logical
                  name when done.

                  Some of the more common license PAKs:

           DECnet Phase IV:   DVNETRTG, DVNETEND, DVNETEXT, or NET-APP-SUP*
           DECnet-Plus:       DVNETRTG, DVNETEND, DVNETEXT, or NET-APP-SUP*
           TCP/IP Services:   UCX, or NET-APP-SUP*
           OpenVMS Alpha:     OPENVMS-ALPHA and OPENVMS-ALPHA-USER
           OpenVMS VAX:       VAX-VMS
           OpenVMS Galaxy:    OPENVMS-GALAXY
           Cluster (Alpha):   VMSCLUSTER, NET-APP-SUP*
           Cluster (VAX):     VAXCLUSTER, NET-APP-SUP*

                  Various NET-APP-SUP (NAS) license packages are
                  available, each with differing collections of products
                  authorized. See the various NAS Software Product
                  Description (SPD) documents for specific details.

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

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

                  To determine which license PAK is failing (via a
                  license check failure OPCOM message), use the command:

                  $ DEFINE/SYSTEM/EXECUTIVE LMF$DISPLAY_OPCOM_MESSAGE TRUE

                                                                     12-5


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