HP OpenVMS Systems Documentation |
OpenVMS DCL Dictionary
Output Strings from Zero-Filled Numeric Conversion
Directives for zero-filled numeric conversion convert an integer (specified as an argument for the directive) to decimal, octal, or hexadecimal notation. The ASCII representation of the integer is inserted into the control string. Default output field lengths for the converted argument are determined as follows:
For byte conversion, only the low-order 8 bits of the binary representation of the argument are used. For word conversion, only the low-order 16 bits of the binary representation of the argument are used. For longword conversion, the entire 32-bit binary representation of the argument is used.
Output Strings from Blank-Filled Numeric Conversion
Directives for blank-filled numeric conversion convert an integer (specified as an argument for the directive) to decimal notation. These directives can convert the integer as a signed or unsigned number. The ASCII representation of the integer is inserted into the control string. Output field lengths for the converted argument default to the required number of characters. Values shorter than explicit-length fields are right-justified and blank-filled; values longer than explicit-length fields cause the field to be filled with asterisks. For byte conversion, only the low-order 8 bits of the binary representation of the argument are used. For word conversion, only the low-order 16 bits of the binary representation of the argument are used. For longword conversion, the entire 32-bit binary representation of the argument is used.
Output Strings from Special Formatting Directives
The !n%C and !%E directives insert an ASCII string (based on the value of the most recently evaluated argument) into the output string. These directives are useful for inserting irregular plural nouns and verbs. If the most recently evaluated argument equals n, the text between one directive and the next is inserted into the output string. If the most recently evaluated argument does not equal n, the next !n%C directive is processed. If n must be a negative number, you must specify it as an argument and use the number sign (#). You can specify the !n%C and !%E directives with repeat counts. If you specify repeat counts, the text between one directive and the next is copied to the output string the specified number of times. The %F directive marks the end of a plurals statement.
|
#1 |
---|
$ COUNT = 57 $ REPORT = F$FAO("NUMBER OF FORMS = !SL",COUNT) $ SHOW SYMBOL REPORT REPORT = "NUMBER OF FORMS = 57" |
In this command procedure, the FAO directive !SL is used in a control string to convert the number equated to the symbol COUNT to a character string. The converted string is inserted into the control string.
Note that COUNT is assigned an integer value of 57. The F$FAO function returns the ASCII string, "NUMBER OF FORMS = 57", and assigns the string to the symbol REPORT.
#2 |
---|
$ A = "ERR" $ B = "IS" $ C = "HUM" $ D = "AN" $ PHRASE = F$FAO("TO !3(AS)",A,B,C+D) $ SHOW SYMBOL PHRASE $ PHRASE = "TO ERRISHUMAN" |
In this command procedure, the !AS directive is used to insert the values assigned to the symbols A, B, C, and D into the control string.
Because the specified repeat count for the !AS directive is 3, F$FAO looks for three arguments. The arguments in this example include the symbol A ("ERR"), the symbol B ("IS"), and the expression C+D ("HUMAN"). Note that the values of these string arguments are concatenated to form the string "ERRISHUMAN".
#3 |
---|
$ A = "ERR" $ B = "IS" $ C = "HUMAN" $ PHRASE = F$FAO("TO !#(#AS)",3,6,A,B,C) $ SHOW SYMBOL PHRASE $ PHRASE = "TO ERR IS HUMAN " |
In this command procedure, the F$FAO function is used with the !AS directive to format a character string. The first number sign (#) represents the repeat count given by the first argument, 3. The second number sign represents the field size given by the second argument, 6. The next three arguments (A,B,C) provide the strings that are placed into the control string each time the !AS directive is repeated.
Each argument string is output to a field having a length of 6 characters. Because each string is less than 6 characters, each field is left-justified and padded with blank spaces. The resulting string is assigned to the symbol PHRASE.
#4 |
---|
$ OFFSPRING = 1 $ REPORT = F$FAO- ("There !0UL!1%Cis!%Eare!%F !-!UL !-!0UL!1%Cchild!%Echildren!%F here",1) $ SHOW SYMBOL REPORT $ REPORT ="There is 1 child here" |
In this command procedure, the !0UL directive evaluates the argument OFFSPRING but does not insert the value in the output string. The !n%C directive inserts the character string "is" into the output string because its value and the value of the argument OFFSPRING match. The directives !-!UL evaluate the argument a second time so that the correct character string can be inserted in the proper place in the output string. The !%F directive marks the end of each plurals statement. The F$FAO function returns the ASCII string "There is 1 child here" and assigns the string to the symbol REPORT.
Returns attribute information for a specified file.
F$FILE_ATTRIBUTES (filespec,item)
filespec
Specifies the name of the file about which you are requesting information. You must specify the file name as a character string expression.You can specify only one file name. Wildcard characters are not allowed.
item
Indicates which attribute of the file is to be returned. The item argument must be specified as a character string expression, and can be any one of the OpenVMS RMS field names listed in Table DCLI-5.
Use the F$FILE_ATTRIBUTES lexical function in DCL assignment statements and expressions to return file attribute information. Table DCLI-5 lists the items you can specify with the F$FILE_ATTRIBUTES function, the information returned, and the data type of this information.
Table DCLI-5 F$FILE_ATTRIBUTES Items Item Return Type Information Returned AI String TRUE if after-image (AI) journaling is enabled; FALSE if disabled. ALQ Integer Allocation quantity. BDT String Backup date/time. BI String TRUE if before-image (BI) journaling is enabled; FALSE if disabled. BKS Integer Bucket size. BLS Integer Block size. CBT String TRUE if contiguous-best-try; otherwise FALSE. CDT String Creation date/time. CTG String TRUE if contiguous; otherwise FALSE. DEQ Integer Default extension quantity. DID String Directory ID string. DIRECTORY String Returns TRUE or FALSE. Returns TRUE if it is a directory. DVI String Device name string. EDT String Expiration date/time. EOF Integer Number of blocks used. ERASE String TRUE if a file's contents are erased before a file is deleted; otherwise FALSE. FFB Integer First free byte. FID String File ID string. FILE_LENGTH_HINT String Record count and data byte count in the form ( n,m), where n is the record count and m is the data byte count. An invalidated count is specified by a -1 for n or m. FSZ Integer Fixed control area size. GBC Integer Global buffer count. GRP Integer Owner group number. JOURNAL_FILE String TRUE if the file is a journal; otherwise FALSE. KNOWN String Known file; returns TRUE or FALSE to indicate whether file is installed with the Install utility (INSTALL). However, returns NOSUCHFILE if a file does not exist (for example, the file has been installed but subsequently deleted). LOCKED String TRUE if a file is deaccessed-locked; otherwise FALSE. LRL Integer Longest record length. MBM Integer Owner member number. MOVE String TRUE if movefile operations are enabled; otherwise FALSE. MRN Integer Maximum record number. MRS Integer Maximum record size. NOA Integer Number of areas. NOBACKUP String FALSE if the file is marked for backup; TRUE if the file is marked NOBACKUP. NOK Integer Number of keys. ORG String File organization; returns SEQ, REL, IDX. PRESHELVED (Alpha only) String TRUE if the file is preshelved; otherwise FALSE. PRO String File protection string. PVN Integer Prolog version number. RAT String Record attributes; returns CR, PRN, FTN, "". RCK String TRUE if read check; otherwise FALSE. RDT String Revision date/time. RFM String Record format string; returns the values VAR, FIX, VFC, UDF, STM, STMLF, STMCR. RU String TRUE if recovery unit (RU) journaling is enabled; returns TRUE or FALSE. RVN Integer Revision number. SHELVABLE String TRUE if the file is shelvable; otherwise FALSE. SHELVED String TRUE if the file is shelved; otherwise FALSE. STORED_SEMANTICS String ASCII string that represents stored semantics. UIC String Owner user identification code (UIC) string. VERLIMIT Integer Version limit number. The value 32767 indicates that no version limit was set. WCK String TRUE if write check; otherwise FALSE. File attributes are stored in the file header, which is created from information in OpenVMS RMS control blocks. For more information on OpenVMS RMS control blocks, refer to the OpenVMS Record Management Services Reference Manual.
#1 |
---|
$ FILE_ORG = F$FILE_ATTRIBUTES("QUEST.DAT","ORG") $ SHOW SYMBOL FILE_ORG FILE_ORG = "SEQ" |
This example uses the F$FILE_ATTRIBUTES function to assign the value of the file organization type to the symbol FILE_ORG. The F$FILE_ATTRIBUTES function returns the character string SEQ to show that QUEST.DAT is a sequential file.
The QUEST.DAT and ORG arguments for the F$FILE_ATTRIBUTES function are string literals and must be enclosed in quotation marks (" ") when used in expressions.
#2 |
---|
$ RFM = F$FILE_ATTRIBUTES("KANSAS::USE$:[CARS]SALES.CMD","RFM") $ SHOW SYMBOL RFM RFM = "VAR" |
This example uses the F$FILE_ATTRIBUTES function to return information about a file on a remote node. The function returns the record format string VAR, indicating that records are variable length.
Returns a specified item of information for a specified device.
F$GETDVI (device-name,item)
device-name
Specifies a physical device name or a logical name equated to a physical device name. Specify the device name as a character string expression.After the device-name argument is evaluated, the F$GETDVI function examines the first character of the name. If the first character is an underscore (_), the name is considered a physical device name; otherwise, a single level of logical name translation is performed and the equivalence name, if any, is used.
item
Specifies the type of device information to be returned. The item argument must be specified as a character string expression and can be any one of the items listed in Table DCLI-6.
The F$GETDVI lexical function invokes the $GETDVI system service to return a specified item of information for a specified device. You can obtain a list of devices on your current system by using the lexical function F$DEVICE. Unless otherwise stated in the description of the item argument, F$GETDVI returns device information about the local node only.This lexical function allows a process to obtain information for a device to which the process has not necessarily assigned a channel.
The F$GETDVI function returns information on all items that can be specified with the $GETDVI system service. In addition to the items that the $GETDVI system service allows, the F$GETDVI function allows you to specify the item EXISTS.
Table DCLI-6 lists the items you can specify with the F$GETDVI function, the type of information returned, and the data types of the return values. In addition to the return information listed in Table DCLI-6, the F$GETDVI lexical function returns any error messages generated by the system service $GETDVI.
For more information on the $GETDVI system service and the items you can specify, refer to the OpenVMS System Services Reference Manual.
Table DCLI-6 F$GETDVI Items Item Return Type Information Returned1 ACPPID String Ancillary control process (ACP) identification. ACPTYPE String ACP type code, as one of the following strings: F11V1, F11V2, F11V3, F11V4, F11V5, F64, HBS, JNL, MTA, NET, REM, UCX, or ILLEGAL. The ACPTYPE item returns ILLEGAL if:
- The device is not mounted or is mounted using the /FOREIGN qualifier.
- The ACPTYPE is not currently defined.
ALL String TRUE or FALSE to indicate whether the device is allocated. ALLDEVNAM String Allocation class device name. ALLOCLASS Longword integer between 0 and 255 Allocation class of the host. ALT_HOST_AVAIL String TRUE or FALSE to indicate whether the host serving the alternate path is available. ALT_HOST_NAME String Name of the host serving the alternate path. ALT_HOST_TYPE String Hardware type of the host serving the alternate path. AVL String TRUE or FALSE to indicate whether the device is available for use. CCL String TRUE or FALSE to indicate whether the device is a carriage control device. CLUSTER Integer Volume cluster size. CONCEALED String TRUE or FALSE to indicate whether the logical device name translates to a concealed device. CYLINDERS Integer Number of cylinders on the volume (disks only). DEVBUFSIZ Integer Device buffer size. DEVCHAR Integer Device characteristics. DEVCHAR2 Integer Additional device characteristics. DEVCLASS Integer Device class. See the Examples section to determine the device class values returned on your system. DEVDEPEND Integer Device-dependent information. DEVDEPEND2 Integer Additional device-dependent information. DEVLOCKNAM String A unique lock name for the device. DEVNAM String Device name. DEVSTS Integer Device-dependent status information. DEVTYPE Integer Device type. See the Examples section to determine the device type values returned on your system. DEVICE_TYPE_NAME String Device type name. Note that if the device is a SCSI tape or disk, the device type name is retrieved directly from the device. DFS_ACCESS String TRUE or FALSE to indicate whether the device is a virtual disk connected to a remote Distributed File System (DFS) server. DIR String TRUE or FALSE to indicate whether the device is directory structured. DMT String TRUE or FALSE to indicate whether the device is marked for dismount. DUA String TRUE or FALSE to indicate whether the device is a generic device. ELG String TRUE or FALSE to indicate whether the device has error logging enabled. ERRCNT Integer Error count. EXISTS String TRUE or FALSE to indicate whether the device exists on the system. FOD String TRUE or FALSE to indicate whether the device is a files-oriented device. FOR String TRUE or FALSE to indicate whether the device is mounted using the /FOREIGN qualifier. FREEBLOCKS Integer Number of free blocks on the volume (disks only). FULLDEVNAM String Fully qualified device name. GEN String TRUE or FALSE to indicate whether the device is a generic device. HOST_AVAIL String TRUE or FALSE to indicate whether the host serving the primary path is available. HOST_COUNT Integer Number of hosts that make the device available to other nodes in the OpenVMS Cluster. HOST_NAME String Name of the host serving the primary path. HOST_TYPE String Hardware type of the host serving the primary path. IDV String TRUE or FALSE to indicate whether the device is capable of providing input. LOCKID Integer Clusterwide lock identification. LOGVOLNAM String Logical volume name. MAXBLOCK Integer Number of logical blocks on the volume. MAXFILES Integer Maximum number of files on the volume (disks only). MBX String TRUE or FALSE to indicate whether the device is a mailbox. MEDIA_ID String Nondecoded media ID. MEDIA_NAME String Either the name of the disk or the tape type. MEDIA_TYPE String Device name prefix. MNT String TRUE or FALSE to indicate whether the device is mounted. MOUNTCNT Integer Number of times the volume has been mounted on the local system. The value of MOUNTCNT displayed by the SHOW DEVICE command is the total of all mounts of the volume across all members of the cluster.
MT3_DENSITY String Current density of the device (tapes only.) MT3_SUPPORTED String TRUE or FALSE to indicate whether the device supports densities defined in the MT3DEF (for Alpha tapes only.) NET String TRUE or FALSE to indicate whether the device is a network device. NEXTDEVNAM String Device name of the next volume in a volume set (disks only). ODV String TRUE or FALSE to indicate whether the device is capable of providing output. OPCNT Integer Operation count. OPR String TRUE or FALSE to indicate whether the device is an operator. OWNUIC String User identification code (UIC) of the device owner. PID String Process identification number of the device owner. PREFERRED_CPU String Return argument is a 32-bit CPU bit mask with a bit set indicating the preferred CPU. A return argument containing a bit mask of zero indicates that no preferred CPU exists, either because Fast Path is disabled or the device is not a Fast Path capable device. The return argument serves as a CPU bit mask input argument to the $PROCESS_AFFINITY system service. The argument can be used to assign an application process to the optimal preferred CPU. RCK String TRUE or FALSE to indicate whether the device has read checking enabled. RCT String TRUE or FALSE to indicate whether the disk contains RCT. REC String TRUE or FALSE to indicate whether the device is record oriented. RECSIZ Integer Blocked record size. REFCNT Integer Reference count of processes using the device. REMOTE_DEVICE String TRUE or FALSE to indicate whether the device is a remote device. RND String TRUE or FALSE to indicate whether the device allows random access. ROOTDEVNAM String Device name of the root volume in a volume set (disks only). RTM String TRUE or FALSE to indicate whether the device is a real-time device. SDI String TRUE or FALSE to indicate whether the device is single-directory structured. SECTORS Integer Number of sectors per track (disks only). SERIALNUM Integer Volume serial number (disks only). SERVED_DEVICE String TRUE or FALSE to indicate whether the device is a served device. SET_HOST_TERMINAL String TRUE or FALSE to indicate whether the device is a remote terminal for a SET HOST session from a remote node. SHDW_CATCHUP_COPYING String TRUE or FALSE to indicate whether the device is a member that is the target of a full copy operation. SHDW_MASTER String TRUE or FALSE to indicate whether the device is a virtual unit. SHDW_MASTER_NAME String Device name of the virtual unit that represents the shadow set of which the specified device is a member. F$GETDVI returns a null string ("") if the specified device is not a member, or is itself a virtual unit. SHDW_MEMBER String TRUE or FALSE to indicate whether the device is a shadow set member. SHDW_MERGE_COPYING String TRUE or FALSE to indicate whether the device is a merge member of the shadow set. SHDW_NEXT_MBR_NAME String Device name of the next member in the shadow set. If you specify a virtual unit, F$GETDVI returns the device name of a member of the shadow set. If you specify the name of a shadow set member unit with the device name and item arguments, F$GETDVI returns the name of the "next" member unit or a null string if there are no more members. To determine all the members of a shadow set, first specify the virtual unit to F$GETDVI; on subsequent calls, specify the member name returned by the previous F$GETDVI call until it has finished, when it returns a null member name.
The device name includes the allocation class if the allocation class is not zero; otherwise it includes the device name of the disk controller.
SHR String TRUE or FALSE to indicate whether the device is shareable. SPL String TRUE or FALSE to indicate whether the device is being spooled. SPLDEVNAM String Name of the device being spooled. SQD String TRUE or FALSE to indicate whether the device is sequential block-oriented (that is, magnetic tape). STS Integer Status information. SWL String TRUE or FALSE to indicate whether the device is software write-locked. TRACKS Integer Number of tracks per cylinder (disks only). TRANSCNT Integer Volume transaction count. TRM String TRUE or FALSE to indicate whether the device is a terminal. TT_ACCPORNAM String The terminal server name and port name. TT_ALTYPEAHD String TRUE or FALSE to indicate whether the terminal has an alternate type-ahead buffer (terminals only). TT_ANSICRT String TRUE or FALSE to indicate whether the terminal is an ANSI CRT terminal (terminals only). TT_APP_KEYPAD String TRUE or FALSE to indicate whether the keypad is in applications mode (terminals only). TT_AUTOBAUD String TRUE or FALSE to indicate whether the terminal has automatic baud rate detection (terminals only). TT_AVO String TRUE or FALSE to indicate whether the terminal has a VT100-family terminal display (terminals only). TT_BLOCK String TRUE or FALSE to indicate whether the terminal has block mode capability (terminals only). TT_BRDCSTMBX String TRUE or FALSE to indicate whether the terminal uses mailbox broadcast messages (terminals only). TT_CHARSET Integer A bitmap indicating the coded character set supported by the terminal. TT_CRFILL String TRUE or FALSE to indicate whether the terminal requires fill after a carriage return (terminals only). TT_CS_KANA String TRUE or FALSE to indicate whether the terminal supports the DEC Kana coded character set. TT_CS_KANJI String TRUE or FALSE to indicate whether the terminal supports the DEC Kanji coded character set. TT_CS_HANZI String TRUE or FALSE to indicate whether the terminal supports the DEC Hanzi coded character set. TT_CS_HANGUL String TRUE or FALSE to indicate whether the terminal supports the DEC Korean coded character set. TT_CS_HANYU String TRUE or FALSE to indicate whether the terminal supports the DEC Hanyu coded character set. TT_CS_THAI String TRUE or FALSE to indicate whether the terminal supports the DEC Thai coded character set. TT_DECCRT String TRUE or FALSE to indicate whether the terminal is a DIGITAL CRT terminal (terminals only). TT_DECCRT2 String TRUE or FALSE to indicate whether the terminal is a DIGITAL CRT2 terminal (terminals only). TT_DECCRT3 String TRUE or FALSE to indicate whether the terminal is a DIGITAL CRT3 terminal (terminals only). TT_DECCRT4 String TRUE or FALSE to indicate whether the terminal is a DIGITAL CRT4 terminal (terminals only). TT_DIALUP String TRUE or FALSE to indicate whether the terminal is connected to dialup (terminals only). TT_DISCONNECT String TRUE or FALSE to indicate whether the terminal can be disconnected (terminals only). TT_DMA String TRUE or FALSE to indicate whether the terminal has direct memory access (DMA) mode (terminals only). TT_DRCS String TRUE or FALSE to indicate whether the terminal supports loadable character fonts (terminals only). TT_EDIT String TRUE or FALSE to indicate whether the edit characteristic is set. TT_EDITING String TRUE or FALSE to indicate whether advanced editing is enabled (terminals only). TT_EIGHTBIT String TRUE or FALSE to indicate whether the terminal uses the 8-bit ASCII character set (terminals only). TT_ESCAPE String TRUE or FALSE to indicate whether the terminal generates escape sequences (terminals only). TT_FALLBACK String TRUE or FALSE to indicate whether the terminal uses the multinational fallback option (terminals only). TT_HALFDUP String TRUE or FALSE to indicate whether the terminal is in half-duplex mode (terminals only). TT_HANGUP String TRUE or FALSE to indicate whether the hangup characteristic is set (terminals only). TT_HOSTSYNC String TRUE or FALSE to indicate whether the terminal has host/terminal communication (terminals only). TT_INSERT String TRUE or FALSE to indicate whether insert mode is the default line editing mode (terminals only). TT_LFFILL String TRUE or FALSE to indicate whether the terminal requires fill after a line feed (terminals only). TT_LOCALECHO String TRUE or FALSE to indicate whether the local echo characteristic is set (terminals only). TT_LOWER String TRUE or FALSE to indicate whether the terminal has the lowercase characters set (terminals only). TT_MBXDSABL String TRUE or FALSE to indicate whether mailboxes associated with the terminal will receive unsolicited input notification or input notification (terminals only). TT_MECHFORM String TRUE or FALSE to indicate whether the terminal has mechanical form feed (terminals only). TT_MECHTAB String TRUE or FALSE to indicate whether the terminal has mechanical tabs and is capable of tab expansion (terminals only). TT_MODEM String TRUE or FALSE to indicate whether the terminal is connected to a modem (terminals only). TT_MODHANGUP String TRUE or FALSE to indicate whether the modify hangup characteristic is set (terminals only). TT_NOBRDCST String TRUE or FALSE to indicate whether the terminal will receive broadcast messages (terminals only). TT_NOECHO String TRUE or FALSE to indicate whether the input characters are echoed. TT_NOTYPEAHD String TRUE or FALSE to indicate whether data must be solicited by a read operation. TT_OPER String TRUE or FALSE to indicate whether the terminal is an operator terminal (terminals only). TT_PAGE Integer Terminal page length (terminals only). TT_PASTHRU String TRUE or FALSE to indicate whether PASSALL mode with flow control is available (terminals only). TT_PHYDEVNAM String Physical device name associated with a channel number or virtual terminal. TT_PRINTER String TRUE or FALSE to indicate whether there is a printer port available (terminals only). TT_READSYNC String TRUE or FALSE to indicate whether the terminal has read synchronization (terminals only). TT_REGIS String TRUE or FALSE to indicate whether the terminal has ReGIS graphics (terminals only). TT_REMOTE String TRUE or FALSE to indicate whether the terminal has established modem control (terminals only). TT_SCOPE String TRUE or FALSE to indicate whether the terminal is a video screen display (terminals only). TT_SECURE String TRUE or FALSE to indicate whether the terminal can recognize the secure server (terminals only). TT_SETSPEED String TRUE or FALSE to indicate whether you cannot set the speed on the terminal line (terminals only). TT_SIXEL String TRUE or FALSE to indicate whether the sixel is supported (terminals only). TT_SYSPWD String TRUE or FALSE to indicate whether the system password is enabled for a particular terminal. TT_TTSYNC String TRUE or FALSE to indicate whether there is terminal/host synchronization (terminals only). TT_WRAP String TRUE or FALSE to indicate whether a new line should be inserted if the cursor moves beyond the right margin. UNIT Integer The unit number. VOLCOUNT Integer The count of volumes in a volume set (disks only). VOLNAM String The volume name. VOLNUMBER Integer Number of the current volume in a volume set (disks only). VOLSETMEM String TRUE or FALSE to indicate whether the device is a volume set (disks only). VPROT String The volume protection mask. WWID String Worldwide identifier for a Fibre Channel device. WCK String TRUE or FALSE to indicate whether the device has write checking enabled.
#1 |
---|
$ ERR = F$GETDVI("_DQA0","ERRCNT") $ SHOW SYMBOL ERR ERR = 0 Hex = 00000000 Octal = 000000 |
Previous Next Contents Index