=;The OpenVMS Frequently Asked Questions (FAQ)D

The OpenVMS Frequently Asked Questions (FAQ)



 r \ ^  
PreviousContentsIndex

j

10.23 Status of Programming Tools on OpenVMS VAX?



HDECthreads 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 Creleases of these development packages for use on OpenVMS VAX. The Erun-time support for both DECthreads (CMA$RTL) and for C (DECC$CRTL) will continue to beHmaintained, and will continue to be available on OpenVMS VAX. The VAX C GV3.2 compiler is the final VAX C compiler release for OpenVMS VAX, and Hthe VAX C Run-Time Library (VAXCRTL) will also continue to be available.

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

10.24 Choosing a Version Number for Application Code?



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



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

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

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

10.25 Selecting a Process Dump Directory?



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

 

"
#$ define SYS$PROCDMP SYS$ERRORLOG: 3$ define /exec SYS$PROTECTED_PROCDMP SYS$ERRORLOG: 




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

EThere 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.26 Access to Itanium Assembler?



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

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

1A typical "as." script looks like this:

 

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


b

10.27 Kernel-mode coding restrictions?



FFloating point is prohibited in OpenVMS Alpha inner-mode (privileged) Fcode, 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 Fkernel-mode code, such as device drivers, will further want to become Dfamiliar with the floating-point processing and the instruction set Hemulation available in the particular target environment (if any). When Dworking with C, inner-mode programmers will want to become familiar Bwith the C compiler qualifier /INSTRUCTION_SET=[NO]FLOATING_POINT.

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

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

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

DTo include kernel-mode C programming definitions, macros and system *constants within a C compilation, include DSYS$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.TLBGtend to be version-dependent, or undocumented, or both.) As an example ?of the compilation, the following is a typical C device driver compilation command:

 

"
M$   CC /STANDARD=RELAXED_ANSI89/INSTRUCTION=NOFLOATING_POINT/EXTERN=STRICT - G        '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 




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

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

10.28 Decoding an Access Violation (ACCVIO) Error?



FTo decode the virtual addresses returned by an access violation or by Ganother 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.

FStarting with the virtual address reported by the error, use the link Cmap to find the module that contributed the code that contains the Hvirtual address range. Calculate the offset from the base of the range, Gby subtracting the base of the range from teh failing virtual address. AThen use the compiler listings for the particular component that Econtributed the code to locate the offset of the failing instruction.

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

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

EThe 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 Bcondition, and this is far easier than working backwards from the Finstruction stream is to use integrated debugging---this inclusion is Harguably an essential component of any non-trivial application---and to Buse the OpenVMS Debugger. The debugger can also be activated from Ewithin a signal handler, and commands to generate a traceback can be Hgenerated directly, or through the invocation of a procedure containing a series of debugger commands.

EDetails on the debugger are in the OpenVMS Debugger Manual, and also =see the discussion of dyanmically activating the Debugger in 3Section 10.19.c

10.29 Generating an AUTODIN-II CRC32?



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

GThe routine uses the OpenVMS library routine lib$crc_table to generate Ga sixteen longword array of data from the specified encoded polynomial Ecoefficient (AUTODIN-II, in this case), and then lib$crc to generate 2the 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 );  A  lib$crc_table( (void *) &Coefficient, (void *) CRCArray ); N  AUTODIN2 = lib$crc( (void *) CRCArray, (void *) &Seed, InputDataDesc );   AUTODIN2 ^= Seed;    return AUTODIN2;   } 


X

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 1SYSMAN> SYS_LOAD REMOVE TR$DEBUG TR$DEBUG/LOG SYSMAN> Exit $$ @SYS$UPDATE:VMS$SYSTEM_IMAGES.COM 




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

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

Also see the SDA TR extension.

GFor details of using these tracing mechanisms, see the tr_print macros ?in lib.mlb (Macro32), in sys$lib_c.tlb (C) and lib.req (Bliss) libraries.b

10.31 Accessing a web server from DCL?



GProgrammatic access to the world-wide web is available from within DCL Ecommand procedures using available software packages including cURL, CFETCH_HTTP, and Lynx, and there is the universal web client telnet.BUsing these packages, you can access a web server and can (within 9limits) process HTML from within a DCL command procedure.

CFor information and locations for these and of other packages, see 1Section 13.1.

BDCL can also be used as a CGI script implementation language from Dwithin Apache and most (all?) other OpenVMS web servers. As a rule, Gperl and python and such will be more flexible and will have dedicated Fprocessing libraries available for common web and http-related tasks, Hbut DCL can deal easily with many of the more typical tasks required of Ha CGI script. There are examples of DCL CGI scripts available, and most B(all?) OpenVMS web server packages will include specific examples ;within the particular package or the package documentation.


>

Chapter 11
DECwindows


A

If you are searching for something here, please (consider using the text-format FAQ.

z

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



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

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

m

11.2 How do I create a display on another workstation?



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

 

"
A$ SET DISPLAY /CREATE /TRANSPORT=net_transport /NODE=remote_node 7$ SET DISPLAY /CREATE /TRANSPORT=LAT /NODE=remote_node :$ SET DISPLAY /CREATE /TRANSPORT=DECnet /NODE=remote_node 9$ SET DISPLAY /CREATE /TRANSPORT=TCPIP /NODE=remote_node 




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

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

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



AUse the undocumented SHOW DISPLAY/SYMBOL, and then reference the Dsymbols DECW$DISPLAY_NODE, DECW$DISPLAY_SCREEN, DECW$DISPLAY_SERVER and/or DECW$DISPLAY_TRANSPORT.

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

 

"
1- http://www.hp.com/go/openvms/freeware/  


FLook in the Freeware V4.0 directory /srh_examples/DECUS_UNDOC_CLINIC/.d

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



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

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

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

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

11.5 Why is DECwindows Motif not starting?



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



)If there is a G* graphics device present:






 r Y \ ^  
PreviousNextContentsIndex