=;The OpenVMS Frequently Asked Questions (FAQ)D

The OpenVMS Frequently Asked Questions (FAQ)



 r \ ^  
PreviousContentsIndex



InfoServerB hardware configurations are no longer available from HP, but may A potentially be acquired through other means; as used equipment. A InfoServer support also has very specific CD-R recording device D prerequisites, and these recording devices are no longer generally available.

EPackages related to the use of DVD archiving are also available, see Athe multi-volume capabilities of the DVDarchive/restore Freeware.

 

"
JF http://www.geocities.com/SiliconValley/Lakes/9999/vmscdwri.html  




;Additional information is available at the following sites:



U.S. DesignF offers a package that includes the tools necessary to create a CD or ; DVD-R with either ISO-9660 or ODS-2 format, for standaloneACD-R/RW, DVD-R, or DVD+R/RW drives, for recent OpenVMS versions. Details are available at:



lAlso see Section 9.7.2 for details on access to recorded media on older CD-ROM drives.H

9.7.1 CD and DVD notation, terminology?



CCD-ROM is pre-recorded Compact Disk media, and is the original and Boldest CD format. The original CD media was physically stamped, a Erecording process that is now largely reserved to the highest-volume media reproduction requirements.

GCD-R is CD Recordable, a write-once storage medium that can be read by Fall but the oldest of CD drives; a format which can be read and often #even recorded by most CD-RW drives.

ECD-RW is CD ReWritable, a format which is readable by many CD drives Aand by most CD-R drives, and with media that can be recorded and re-recorded by CD-RW drives.

GCD media recording speeds are listed as multiples of 150 kilobytes per Esecond, so a 10X drive records at 1500 kilobytes (1.5 megabytes) per >second. 600 MB (70 minutes) and 700 MB (80 minutes) recording Acapacities are both widely available. The minutes designation is Dderived from the traditional audio-format recording capacity of the particular media.

:DVD-R/RW is the older of two common Digital Versatile DiskGrecording formats, and the DVD-R Recordable or DVD-RW ReWritable media Acan be read by many DVD drives. As with CD-R formats in older CD Ddrives, older DVD and particularly first-generation DVD players may (have problems reading this media format.

?DVD+R/RW is the newer of the two common Digital Versatile Disk Grecording formats, and the DVD+R Recordable or DVD+RW ReWritable media Bcan be read by many DVD drives. Akin to DVD-R/RW media, older and Hparticularly first-generation DVD drives can have problems reading this media format.

FThe DVD Plus-series drives and media tend to record faster than Minus Fdrives, as (as of this writing) the Plus (+) drives do not require an Einitial media formatting pass and the Minus (-) drives do. While the Gappropriate Plus (+) or Minus (-) DVD raw media must be chosen for the Fparticular DVD recorder (and DVD recording drives that are compatible Hwith and capable of using both Plus and Minus media are available), the Hresulting recorded media is generally readable (playable) in all recent GDVD drives and DVD players, regardless of type. (Compatibility is best Bwithin the same media-series devices of course, but be certain to Hverify compatibility across devices regardless of the particular device &or particular recording media chosen.)

HPresently Plus (+) media is slightly more expensive than Minus (-), but Gwith the prices of all CD and all DVD media continuing to consistently Efall, the differences in DVD media costs are becoming irrelevent for 4all but the production of huge volumes of DVD media.

FThe rated DVD recording speeds are in multiples of 1353 kilobytes per Fsecond, thus a DVD 1X drive is roughly equivalent to a CD 9X drive in $I/O requirements and transfer speed.

FDVD drive recording speed can and does vary. DVD disk drive recording Hspeed is limited by the rated recording speed of the media used, so the Eslower (and cheaper) DVD media will not record any more quickly in a Ffaster drive. A 2.4X DVD drive loaded with 1X media will record at 1X.[

9.7.2 Use of RRD42 and other older (embossed-media) CD drives?



The RRD42H series SCSI CD-ROM drive is sufficiently old that it can have problems D processing CD-R and CD-RW media. Other very old CD drives can have H equivalent media compatibility problems when attempting to read (much) G newer CD media and newer CD media technologies. These older CD drives 2 are generally intended for use with the so-calledE embossed media, rather than with non-embossed recorded (recordable) ! media now in common circulation.

FPlease consider using a slightly-less-ancient CD-ROM or CD-R or CD-RW 7drive when working with non-embossed recorded CD media.

HTo paraphrase one knowledgable---though deliberately nameless---storage @engineer, "The RRD42 drive is just past the drooling idiot stage".d

9.7.3 Creating Bootable OpenVMS I64 CD or DVD Media? SYS$SETBOOT?



DIf you are creating a bootable CD or DVD media for use with OpenVMS FI64, you will want to specify the SYS$SETBOOT block size of 2048, and Hyou will also want a disk cluster factor that is a multiple of four via DINITIALIZE/CLUSTER=4 (or 8, or...), or you will want to ensure that #SYS$EFI.SYS and SYS$DIAGNOSTICS.SYSHare aligned to a multiple of four blocks; to a 2048 byte boundary. This Halignment and this blocking is only necessary for OpenVMS I64, and only 7when creating optical media OpenVMS I64 for bootstraps.

FThe default 512-byte block setting used by SYS$SETBOOT is the correct Band expected value for traditional disk bootstraps on OpenVMS I64 systems.

COnce the boot files are loaded, OpenVMS I64 operates with 512-byte >blocks; as is the case with ATAPI disks on OpenVMS Alpha, all Capplication code will only see 512-byte blocks on optical media on OpenVMS I64.

=OpenVMS I64 V8.2 and later are expected to have a version of GSYS$SETBOOT that will flag a misaligned SYS$EFI.SYS and (if present) a $misaligned SYS$DIAGNOSTICS.SYS file.

EFor information on SYS$SETBOOT and the SET BOOTBLOCK command, please psee Section 14.3.9 and see the OpenVMS documentation. The purpose and Eintent of the SYS$SETBOOT.EXE image and the SET BOOTBLOCK command is Aanalogous to the WRITEBOOT.EXE image on existing OpenVMS VAX and OpenVMS Alpha systems.

FFor information on CD and DVD optical media drives on OpenVMS, please isee Section 14.28. For additional related information on creating ?bootable OpenVMS media, please see Ask The Wizard topic (9820).j

9.8 What I/O transfer size limits exist in OpenVMS?



HThe maximum transfer size is an attribute of the particular I/O device, Fcontroller and driver combination; there is no inherent limit imposed Fby OpenVMS (other than the fact that, today, byte counts and LBNs are generally limited to 32 bits).

DThe maximum size of a device I/O request is limited by the value in BUCB$L_MAXBCNT, which is set by the device driver based on various Dfactors. (Also check the setting of the MAXBUF system parameter for 6buffered I/O transfers, and check the process quotas.)

ECurrently, SCSI drivers limit I/O transfers to FE00(16) bytes, 65024 Cbytes (decimal). The reasons for this transfer size limitation are Dlargely historical. Similarly, DSSI devices are limited to the same Dvalue, this for hardware-specific reasons. Transfers to HSC and HSJ Edevice controllers via the CI are limited to 1,048,576 bytes. Client EMSCP-served devices are limited to 65535 bytes---to help ensure that Fthe I/O fragmentation processing happens on the client and not on the server system.

DParts of the OpenVMS I/O subsystem are optimized for data transfers <less than 64KB, because (obviously) most I/O operations are H(substantially) less than that. OpenVMS can handle larger transfers, if (the driver and the device can handle it.

jAlso see Section 9.4, Section 9.5.o

9.9 Can I use ODBC to connect to OpenVMS database files?



DYes, you can use various available third-party packages that permit ?remote ODBC clients to access RMS files and various commercial databases via the network.

?For RMS, consider acquiring one of the packages available from EEasySoft, Attunity Connect (formerly known as ISG Navigator), Oracle D(DB Integrator), SolutionsIQ, OpenLink Software (OpenLink Universal Data Access), and Synergex.

The unixODBC9 package available at http://www.unixodbc.org 8has variously been found to operate on OpenVMS, as well.

GFor specific commercial databases (other than RMS, of course), contact ,the database vendor directly for assistance.w

9.10 If my disks are shown as VIOC Compatible, am I using XFC?



Yes, you are using XFC caching.

DDisks that are using XFC caching use communication and coordination :protocols that are compatible with the older VIOC caching Gimplementation. With the initial implementation of XFC on OpenVMS, you Gcan use the command SHOW MEMORY/CACHE to see no disks reported in full XFC mode;Call disks shown will be listed in "VIOC Compatable Mode".

DIf you have the OpenVMS system parameter VCC_FLAGS set to 2 and are Eusing OpenVMS Alpha V7.3-1 or later, or are using OpenVMS Alpha V7.3 Fwith the VMS73_XFC V2.0 ECO kit or later or with the UPDATE kits, you are using XFC.

FAnother confusion: the XFC product version is and remains V1.0 in all Hreleased configurations, please do not confuse the internal XFC product @version (displayed by various commands) with the version number Aassociated with the various ECO kit(s). XFC V1.0 does not permit Evolumes to enter full XFC caching, as displayed by the "Vols in Full XFC mode"5 portion of the DCL command SHOW MEMORY/CACHE output.o

9.11 RMS Sequential Files and Platform Portability?



DWhen working with mixed platforms, you will want to become familiar Hwith the various RMS sequential record formats, including Variable with CFixed Control (VFC), stream, stream LF, and stream CR, among other record formats.

FSwitching formats uses CONVERT/FDL or SET FILE/ATTRIBUTES. The former Cconverts files, the latter resets attributes. Text editors tend to Cselect attributes when creating new files that may or may not meet Hrequirements. If the default attributes do not match your requirements, Fcreate a stub file, SET FILE/ATTR, then edit the existing file. (Most 6editors will preserve attributes on an existing file.)

AWhen working with Windows, stream is usually the best choice for Fsequential file operations. Stream LF is most commonly used with UNIX Eand C applications. Windows and UNIX tend not to be able to directly 9read files of "unexpected" sequential RMS record formats.

DVFC is a common OpenVMS format, encoding the record length into the Frecord. It is this extra data that can cause corruption-like problems Bwhen viewed without RMS; either directly via $qio or via the file Fsystem API on other operating system platforms. You will want to look Bat the low-level record formats, and at the RMS and the Files and 2Applications documentation in the OpenVMS manuals.

HIf transfering through other platforms, use of a current version of Zip F(with the "-Vv" or "-V" option) and unzip, or use of a BACKUP saveset Cwill contain and maintain the RMS file and record attributes. (For FBACKUP and its own attributes requirements, see the restoration tool.)


M

Chapter 10
OpenVMS Programming Information


A

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

x

10.1 Modular Programming, Facility Prefixes and Symbol Naming?



DPlease first review the OpenVMS Programming Concepts Manual and the DGuide to Modular Programming manuals. Both are available within the EOpenVMS documentation set, and provide details of the expected norms for OpenVMS programs.



BOpenVMS provides a registry for facility prefixes and for MESSAGE Hmessage compiler codes. To request a prefix and a message facility code Cfor a product you distributinng to other customer sites, send your 'request in a mail message addressed to Dproduct[-at-sign-]hylndr.sqp.zko.dec.com, requesting the submission -form and details of the registration process.



/  
Note

HPlease do not request facility prefixes for products that local to your Cbusiness, your site, or your system. Facility prefixes and message Gcodes and the facility registration process are intended solely for HP Hproducts and Partner Products (and yes, even OpenVMS Freeware packages) Hthat will be distributed across multiple OpenVMS customer sites.


CFor a list of common coding bugs, please see the remainder of this ksection of the FAQ and specifically Section 10.22, please also see the AAsk The Wizard topic (1661), and for information on debugging an -OpenVMS application, please see topic (7552).



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

10.2 Can I have a source code example of calling...?



HPlease use the available SEARCH command on OpenVMS, and please remember Gto search the available resources, including the support databases and Ethe newsgroup archives. Please also realize that most OpenVMS system Cservices use similar calling sequences, meaning that an example of @calling sys$getjpi can be used as an example for sys$getsyi and >sys$getdvi. Students: please do not expect folks to write your*homework for you. As for search resources:



BOpenVMS programming documentation, including the numerous example Aprograms found in recent versions of the OpenVMS Programming #Concepts manual, is available:



EAs for details of argument passing, most OpenVMS system services and BRTL routines pass string arguments by descriptor. Languages which Csupport native string data types create descriptors automatically; Ethose which do not (eg., C) require that you set them up explicitly. DFor further details on using descriptors and particularly for using Rdescriptors from C, please see Section 10.13.

GThere is extensive information available on how to call OpenVMS system Fservices and OpenVMS Run-Time Library routines, including examples in <numerous languages. Among the best available references are:



CIn addition, you can also locate answers, source code examples and Drelated discussions in the Natural Language Search Assistant (AskQ) database:



CIn this area, you will find the source code of programming examplesCfor calls to many of the OpenVMS system services (and from various Hprogramming languages), including calls to core services sys$getjpi[w], Hsys$getsyi[w] and sys$qio[w], as well as source code examples for calls Ato many other system services and run-time library routines, and Bexamples of one of the more difficult calling interfaces found on 5OpenVMS systems, that of the smg$create_menu routine.

DArne Vajhøj has put together a collection of OpenVMS example programs. It can be found at:



BAdditional information and examples for OpenVMS are available via:



HFor additional information on the OpenVMS Ask The Wizard (ATW) area and Bfor a pointer to the available ATW Wizard.zip archive, please see 0Section 3.8.and via:

m

10.3 How do I get the arguments from the command line?



HIf you're writing a program and want to accept arguments from a foreign Gcommand, you can use LIB$GET_FOREIGN to get the command line and parse Eit yourself, or if you're programming in C, use the normal argc/argv method.

2To write an application which uses the normal DCL Gverb/qualifier/parameter syntax for invocation, see the description of Ethe CLI$ routines in the OpenVMS Callable Utility Routines Reference Manual.

GIt is possible to write an application which can be used both ways; if Fa DCL verb isn't used to invoke the image, the application parses the Gcommand line itself. One way to do this is to call CLI$GET_VALUE for a required<parameter. If it is not present (or you get an error), call @LIB$GET_FOREIGN to get the command line and do the manual parse.

8See also Section 8.2.q

10.4 How do I get a formatted error message in a variable?



EUse the SYS$PUTMSG system service with an action routine that stores Gthe message line(s) in the variable of your choice. Be sure the action Aroutine returns a "false" (low bit clear) function value so that SYS$PUTMSGEdoesn't then try to display the message (unless you want it to.) See Gthe description of $PUTMSG in the System Services Reference Manual for &an example of using an action routine.x

10.5 How do I link against SYS$SYSTEM:SYS.STB on an Alpha system?



GLINK/SYSEXE is the OpenVMS Alpha equivalent of linking against SYS.STB.5This links against the base image: SYS$BASE_IMAGE.EXE

iAlso see Section 10.11, particularly for pointers to the details on ishareable images and shareable image creation, and see Section 10.22 ?for details of inner-mode floating point requirements, of data @alignment, requirements for use of /NOSYSLIB, and other related minner-mode programming details, and see Section 10.11 for image-related information.l

10.6 How do I do a SET DEFAULT from inside a program?



EThe problem is that SYS$SETDDIR only changes the default directory - DNOT the default disk. The default disk is determined by the logical HSYS$DISK. If you want to change the default disk within a program, then Fcall LIB$SET_LOGICAL to change the logical SYS$DISK. You will need to Fcall both LIB$SET_LOGICAL and SYS$SETDDIR to change both default disk and the default directory!|

10.7 How do I turn my Fortran COMMON into a shareable image on Alpha?



BYou need to add SYMBOL_VECTOR=(<common-name>=PSECT) to your Goptions file. On OpenVMS VAX all OVR/REL/GBL psects were automatically Dexported into the shareable image's Global Symbol Table. On OpenVMS FAlpha you have to tell the linker that you want this done by means of >the PSECT keyword in the SYMBOL_VECTOR options file statement.

GThis has several advantages over OpenVMS VAX. First, you don't have to Cworry about the address of the psect when you try to create a new, Dupwardly compatible version of the shareable image. Second, you can Econtrol which psects, if any, are made visible outside the shareable image.

FBy default, COMMON PSECTs in HP Fortran for OpenVMS Alpha (as well as Gmost other OpenVMS Alpha compilers) are NOSHR. On VAX, the default was FSHR which required you to change the attribute to NOSHR if you wanted Cyour COMMON to be in a shareable image but not write-shared by all ;processes on the system. If you do want write-sharing, use:

 

"
CDEC$ PSECT common-name=SHR 




Fin the Fortran source code (the CDEC$ must be begin in column 1) or a Alinker options file PSECT_ATTR statement to set the COMMON PSECT attribute to SHR.

/For further information, see the Linker manual.




 r Y \ ^  
PreviousNextContentsIndex