image


 

VSI OpenVMS / VMS DCL Lexicals Functions


Document Number: AA-PV5KK-TK Publication Date: month 2018

This manual provides detailed reference information and examples for VSI OpenVMS DCL commands and lexical functions.


VMS Software, Inc., (VSI) Bolton, Massachusetts, USA


 


Legal Notice

Confidential computer software. Valid license from VSI required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software,
Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.


The information contained herein is subject to change without notice. The only warranties for VSI products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. VSI shall not be liable for technical or editorial errors
or omissions contained herein.


HPE, HPE Integrity, HPE Alpha, and HPE Proliant are trademarks or registered trademarks of Hewlett Packard Enterprise.


Intel, Itanium and IA64 are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.


Java, the coffee cup logo, and all Java based marks are trademarks or registered trademarks of Oracle Corporation in the United States or other countries.


Kerberos is a trademark of the Massachusetts Institute of Technology.


Microsoft, Windows, Windows-NT and Microsoft XP are U.S. registered trademarks of Microsoft Corporation. Microsoft Vista is either a registered trademark or trademark
of Microsoft Corporation in the United States and/or other countries.

Motif is a registered trademark of The Open Group UNIX is a registered trademark of The Open Group.

The VSI OpenVMS documentation set is available on DVD.


 

 

Lexical Functions

Lexical Functions — A set of functions that return information about character strings and attributes of the current process.

NOTE: In this abridged version of the VSI DCL Lexical Manual - the lexical functuons are only for Alpha and Itanium.
The (Alpha and Itanium Only) was messing up the formatting.
If you are running DCL on a VAX - ITS TIME TO MIGRATE TO AN ITANIUM !!!!!

Description

 

The command language includes constructs, called lexical functions, that return information about the current process and about
arithmetic and string expressions. The functions are called lexical functions because the command interpreter evaluates them during
the command input scanning (or lexical processing) phase of command processing.

You can use lexical functions in any context in which you normally use symbols or expressions. In command procedures, you
can use lexical functions to translate logical names, to perform character string manipulations, and to determine the current
processing mode of the procedure.

The general format of a lexical function is as follows:


F$function-name([args,...])

where:


F$

Indicates that what follows is a lexical function.

function-name

A keyword specifying the function to be evaluated. Function names can be truncated to any unique abbreviation.

( )

Enclose function arguments, if any. The parentheses are required for all functions, including functions thatdo not accept any arguments.

args,...

Specify arguments for the function, ifany, using integer or character string expressions.

For more information on specifying expressions, see the VSI OpenVMS User's Manual.

Table 2.1, “Summary of Lexical Functions” lists each lexical function and briefly describes the information that each function returns.
A detailed description of each function, including examples, is given in the following pages.


Table 2.1. Summary of Lexical Functions



Function

Description

F$CONTEXT

Specifies selection criteria for use with the F$PID function.

F$CSID

Returns an OpenVMS Cluster identification number and updates the context symbol to point to the current position in the system's cluster node list.

F$CUNITS

Converts a number from one specified unit of measure to another.

F$CVSI

Extracts bit fields from character string data and converts the result, as a signed value, to an integer.

F$CVTIME

Retrieves information about an absolute, combination, or delta time string.

F$CVUI

Extracts bit fields from character string data and converts the result, as an unsigned value, to an integer.

F$DELTA_TIME

Returns the time difference between a given start and end time.

F$DEVICE

Returns device names of all devices on a system that meet the specified selection criteria.

F$DIRECTORY

Returns the current default directory name string.

F$EDIT

Edits a character string based on the edits specified.

F$ELEMENT

Extracts an element from a string in which the elements are separated by a specified delimiter.

F$ENVIRONMENT

Obtains information about the DCL command environment.

F$EXTRACT

Extracts a substring from a character string expression.

F$FAO

Invokes the $FAO system service to convert the specified control string to a formatted ASCII output string.

F$FID_TO_NAME

Translates a file identification to a file specification.

F$FILE_ATTRIBUTES

Returns attribute information fora specified file.

F$GETDVI

Invokes the $GETDVI system service to return a specified item of information for a specified device.

F$GETENV

Invokes the $GETENV system service to return the value of the specified console environment variable.

F$GETJPI

Invokes the $GETJPI system service to return accounting, status, and identification information for a process.

F$GETQUI

Invokes the $GETQUI system service to return information about queues, batch and print jobs currently in those queues, form definitions, and characteristic definitions kept in the queue database.

F$GETSYI

Invokes the $GETSYI system service to return status and identification information about the local system, or about a node in the local cluster, if your system is part of a cluster.

F$IDENTIFIER

Converts an identifier in named format to its integer equivalent, or vice versa.

F$INTEGER

Returns the integer equivalent of the result of the specified expression.

F$LENGTH

Returns the length of a specified string.

F$LICENSE

Checks whether the specified license is loaded on the system.

F$LOCATE

Locates a character or character substring within a string and returns its offset within the string.

F$MATCH_WILD

Performs a wildcard matching between a candidate and a pattern string.

F$MESSAGE

Returns the message text associated with a specified system status code value.

F$MODE

Shows the mode in which a process is executing.

F$MULTIPATH

Returns a specified item of information for a specific multipath-capable device.

F$PARSE

Invokes the $PARSE RMS service to parse a file specification and return either the expanded file specification or the particular file specification field that you request.

F$PID

For each invocation, returns the next process identification number in sequence.

F$PRIVILEGE

Returns a value of TRUE or FALSE depending on whether your current process privileges match the privileges listed in the argument.

F$PROCESS

Returns the current process name string.

F$SEARCH

Invokes the $SEARCH RMS service to search a directory file,and returns the full file specification for a file you name.

F$SETPRV

Sets the specified privileges and returns a list of keywords indicating the previous state of these privileges for the current process.

F$STRING

Returns the string equivalent of the result of the specified expression.

F$TIME

Returns the current date and time of day, in the format dd-mmm-yyyy hh:mm:ss.cc.

F$TRNLNM

Translates a logical name and returns the equivalence name string or the requested attributes of the logical name.

F$TYPE

Determines the data type of a symbol.

F$UNIQUE

Generates a string that is suitable to be a file name and is guaranteed to be unique across the cluster.

F$USER

Returns the current user identification code (UIC).

F$VERIFY

Returns the integer 1 if command procedure verification is set on; returns the integer 0 if command procedure verification is set off. The F$VERIFY function also can set new verification states.







 

F$CONTEXT

F$CONTEXT — Specifies selection criteria for use with the F$PID function. The F$CONTEXT function enables the F$PID function to obtain information about processes from any node in an OpenVMS Cluster system.

Format

F$CONTEXT(context-type, context-symbol, selection-item, selection-value, value-qualifier)

Return Value

A null string ("").


Arguments

context-type

Specifies the type of context to be built.

At present, the only context type available is PROCESS, which is used in constructing selection criteria for F$PID. Privileges are not required to see processes for the same UIC. To see processes for another UIC in the same UIC group, you need the GROUP privilege, and to see processes systemwide, you need the WORLD privilege.


context-symbol

 

Specifies a symbol that DCL uses to refer to the context memory being constructed by the F$CONTEXT function. The function F$PID uses this context symbol to process the appropriate list of process identification (PID) numbers. Specify the context symbol by using a symbol. The first time you use the F$CONTEXT function in a command procedure, use a symbol that is either undefined or equated to the null string. The symbol created will be a local symbol of type “PROCESS_CONTEXT”. When the context is no longer valid – that is, when all PIDs have been retrieved by calls to the F$PID function or an error occurs during one of these calls – the symbol no longer has a type of
“PROCESS_CONTEXT”. Then you can use the F$TYPE function in the command procedure to find out if it is necessary to cancel the context.

After setting up the selection criteria, use this context symbol when calling F$PID. Specifies a keyword that tells F$CONTEXT which selection criterion to use. Use only one selection-item keyword per call to F$CONTEXT.


Note

Do not use the NEQ selection value on a list of items because it causes the condition to always be true. For example:

$ EXAMPLE=f$context("PROCESS",CTX,"USERNAME","A*,B*","NEQ")

This equation is parsed as “if the user name is not equal to A* or the user name is not equal to B*, then return the process of the users that meet the criteria.” Because the operand is a logical or, the conditions will always be true (any name will be found to be not equal to A* or B*; ALFRED will not be equal to B*; BOB will not be equal to A*).


The following table shows valid selection-item keywords for the PROCESS context type:


Selection Item

Selection Value

Value Qualifiers

Comments

ACCOUNT

String

EQL, NEQ

Valid account name or list of names. The asterisk (*) and the percent sign (%) wildcard characters are allowed.

AUTHPRI

Integer

GEQ, GTR, LEQ, LSS, EQL, NEQ

On Alpha, valid authorized base priority (0--63).

CANCEL



Cancels the selection criteria for this context.

CURPRIV

Keyword

ALL, ANY, EQL, NEQ

Valid privilege name keyword or list of keywords. For more information, see the HP OpenVMS Guide to System Security.

GRP

Integer

GEQ, GTR, LEQ, LSS, EQL, NEQ

UIC group number.

HW_MODEL

Integer

EQL, NEQ

Valid hardware model number.

HW_NAME

String

EQL, NEQ

Valid hardware name or a list of keywords.

The asterisk (*) and the percent sign (%) wildcard characters are allowed.

JOBPRCCNT

Integer

GEQ, GTR, LEQ, LSS, EQL, NEQ

Subprocess count for entire job.

JOBTYPE

Keyword

EQL, NEQ

Valid job-type keyword.

Valid keywords are DETACHED,

NETWORK, BATCH, LOCAL, DIALUP, and

REMOTE. For more information, see the VSI OpenVMS User's Manual.

MASTER_PID

String

EQL, NEQ

PID of master process.

MEM

Integer

GEQ, GTR, LEQ, LSS, EQL, NEQ

UIC member number.

MODE

Keyword

EQL, NEQ

Valid process mode keyword. Valid keywords are OTHER,

NETWORK, BATCH, and

INTERACTIVE. For more information, see the VSI OpenVMS User's Manual.

NODE_CSID

Integer

EQL, NEQ

Node's cluster ID number.

NODENAME

String

EQL, NEQ

Node name or list of node names. The asterisk (*) and the percent sign (%) wildcard characters are allowed. The default

is your local node. To request all nodes, use the value “*”.

OWNER

String

EQL, NEQ

PID of immediate parent process.

PRCCNT

Integer

GEQ, GTR, LEQ, LSS, EQL, NEQ

Subprocess count of process.

PRCNAM

String

EQL, NEQ

Process name or list of process names. The asterisk (*) and the

percent sign (%) wildcard characters are allowed.

PRI

Integer

GEQ, GTR, LEQ, LSS, EQL, NEQ

Process priority level number (0--63, on Alpha).

PRIB

Integer

GEQ, GTR, LEQ, LSS, EQL, NEQ

Base process priority level number (0--63, on Alpha).

STATE

Keyword

EQL, NEQ

Valid process state keyword. For more




information, see the

description of the

$GETJPI service in the HP OpenVMS System Services Reference Manual.

STS

Keyword

EQL, NEQ

Valid process status keyword. For more information, see the description of the

$GETJPI service in the HP OpenVMS System Services Reference Manual.

TERMINAL

String

EQL, NEQ

Terminal name or list of names. The asterisk (*) and the percent sign (%) wildcard characters are allowed.

UIC

String

EQL, NEQ

User identification code (UIC) identifier (that is, of the form “[group,member]”).

USERNAME

String

EQL, NEQ

User name or list of user names. The asterisk (*) and the percent sign (%) wildcard characters are allowed.


 

[selection-value]

Specifies the value of the selection criteria. For example, to process all the processes running on node MYVAX, specify “MYVAX” with the “NODENAME” keyword. For example:


$ X = F$CONTEXT("PROCESS", ctx, "NODENAME", "MYVAX", "EQL")

Values that are lists are valid with some selection items. If you specify more than one item, separate them with commas (,). The following
example specifies a list of the nodes MYVAX, HERVAX, and HISVAX:


$ X=F$CONTEXT("PROCESS",ctx,"NODENAME","MYVAX,HERVAX,HISVAX","EQL")

You can use the asterisk (*) and the percent sign (%) wildcard characters for some values. Using wildcard characters for selection items is similar to using wildcard characters for file names.


value-qualifier

Specifies qualifiers for selection values. You must qualify selection values.

You can qualify a number, for example, by requesting that the selection be based on one of the following process values:

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.

Examples

$ REPORT = F$FAO-

("There !0UL!1%Cis!%Eare!%F !-!UL !-!0UL!1%Cchild!%Echildren!%F here",OFFSPRING)

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







F$FID_TO_NAME

F$FID_TO_NAME — (Alpha/Integrity servers Only). Translates a file identification to a file specification.


Format

F$FID_TO_NAME(device-name,file-id)

Return Value

A character string containing the file specification.


Arguments

device-name

Specifies the device on which the file resides. You can specify a logical name for the device.


 

file-id

Specifies the file identification that is to be translated into the correlating file specification.


Example

$ WRITE SYS$OUTPUT F$FID_TO_NAME("SYS$SYSDEVICE","(2901,33,0)")

DISK$NODE1:[VMS$COMMON.SYSEXE]SHOW.EXE;1

This example demonstrates that the file with identifier "2901,33,0" on the system disk is file SHOW.EXE. Note: You can omit theparentheses around the file identifier, provided it is enclosed by double quotation marks.







F$FILE_ATTRIBUTES

F$FILE_ATTRIBUTES — Returns attribute information for a specified file.


Format

F$FILE_ATTRIBUTES(filespec,item)

Return value

Either an integer or a character string, depending on the item you request.Table 2.3, “F$FILE_ATTRIBUTES Items”shows the data types of the values returned for each item.

Arguments

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 argument must be specified as a character string expression, and can be anyone of the OpenVMS RMS field names listed in Table 2.3, “F$FILE_ATTRIBUTES Items”.

Description

Use the F$FILE_ATTRIBUTES lexical function in DCL assignment statements and expressions to return file attribute information.Table 2.3, “F$FILE_ATTRIBUTES Items” lists the items you can specify with the F$FILE_ATTRIBUTES function, the information returned and the data type of this information.


 

Table 2.3. 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.

GBC32

Integer

Enhanced longword version of global buffer count with a per-file maximum size of about 2.1 billion for indexed files.

GBCFLAGS

String

Per-file management flags for sizing of global buffer cache. Returns PERCENT if global buffer count is expresses as a percent, DEFAULT if global buffer size is determined at runtime by an algorithm using two global buffer SYSGEN parameters (GB_CACHEALLMAX and GB_DEFPERCENT); or NONE if no per-file management flags are enabled for the file.

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 move file 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

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, see the OpenVMS Record Management Services Reference Manual.


Examples

_$ "PGA0.5000-1FE1-0001=5782"

19-MAY-2006 14:47:41.77



This example shows the use of the optional path name parameter for F$GETDVI. If a path is not specified,information for the multipath current path is returned. To determine the paths for a multipath device, use the F$MULTIPATH lexical function.







F$GETENV

F$GETENV — Returns the value of the specified console environment variable.


Format

F$GETENV(itmlst)

 

Return Value

Returns the value of the specified console environment variable. You can modify the console environment variables when the system is in console mode. This lexical function allows you to read the contents of these variables when the system is running.

Arguments

itmlst

The defined console environment variable names are:

Auto_action, Boot_dev, Bootdef_dev, Booted_dev, Boot_file, Booted_file,Boot_osflags, Booted_osflags, Boot_reset, Dump_dev, Enable_audit, License,Char_set, Language, Tty_dev

Description

Returns the value(s) of the specified console environment variable(s).

Example

$ dump_device = F$GETENV("dump_dev")

$ WRITE SYS$OUTPUT "The dump device for this system is ", dump_device

This function writes out the dump device for the system.







F$GETJPI

F$GETJPI — Returns information about the specified process.


Format

F$GETJPI(pid,item)

Return Value

Either an integer or a character string, depending on the item you request. Table 2.5, “F$GETJPI Items” shows the data types of the values
returned foreach item.

Arguments

pid



Specifies the process identification (PID) number of the process for which information is being reported. Specify the argument as a character string expression. You can omit the leading zeros.

If you specify a null string (""), the current PID number is used.

You cannot use an asterisk (*) or percent sign (%)wildcard character to specify the argument in the F$GETJPI function, as you can with the $GETJPI system service. To get a list of process identification numbers, use the F$PID function.


item

Indicates the type of process information to be returned. Specify the argument as a character string expression. You can specify any one of the items listed in Table 2.5, “F$GETJPI Items”

 

The F$GETJPI lexical function invokes the $GETJPI system service to return information about the specified process.


Note

Requires GROUP privilege to obtain information on other processes in the same group. Requires WORLD privilege to obtain information on any other processes in the system. The function returns information on all items that can be specified with the $GETJPI system service. For more information on the $GETJPI system service, see the HP OpenVMS System Services Reference Manual.

The F$GETJPI lexical function returns a zero or a null string if the target process is in a suspended or MWAIT (resource wait) state and the item requested is stored in the virtual address space of the process.

You can use the F$GETJPI lexical function to find out whether a process automatically unshelves files.

When you specify the STS2 item code, F$GETJPI returns a 32--bitnumeric value. When you convert this numeric value to binary format, the digit at symbolic bit position

PCB$V_NOUNSHELVE

shows you the process unshelving default. If the bit is 1, automatic unshelvingis turned off; if 0, automatic unshelving is turned on.

Table 2.5, “F$GETJPI Items” lists the items you can specify with the F$GETJPI function, the information returned, and the data type of this information.


Table 2.5. F$GETJPI Items

Description



Item

Return Type

Information Returned

ACCOUNT

String

Account name string (8 characters filled with trailing blanks).

APTCNT

Integer

Active page table count.

ASTACT

Integer

Access modes with active asynchronous system traps(ASTs).

ASTCNT

Integer

Remaining AST quota.

ASTEN

Integer

Access modes with ASTs enabled.

ASTLM

Integer

AST limit quota.

AUTHPRI

Integer

Maximum priority that a process without the ALTPRI(alter priority) privilege can achieve with the $SETPRI system service.

AUTHPRIV

String

Privileges that a process is authorized to enable.

BIOCNT

Integer

Remaining buffered I/O quota.

BIOLM

Integer

Buffered I/O limit quota.

BUFIO

Integer

Count of process buffered I/O operations.

BYTCNT

Integer

Remaining buffered I/O byte count quota.

BYTLM

Integer

Buffered I/O byte count quota.

CASE_LOOKUP_IMAGE

String

Returns information about the file name lookup case sensitivity of a specified process. This value is set only for the life of the image. Values are BLIND or SENSITIVE. See the Guide to OpenVMS File Applications for additional information.

CASE_LOOKUP_PERM

String

Returns information about the file name lookup case sensitivity of a specified process. This value is set for the life of the process unless the style is set again. Values are BLIND or SENSITIVE. See the Guide to OpenVMS File Applications for additional information.

CLASSIFICATION

String

Current MAC classification, as a 20-byte padded string,stored in the PSB.

CLINAME

String

Current command language interpreter; always returns DCL.

CPULIM

Integer

Limit on process CPU time.

CPUTIM

Integer

CPU time used in hundredths of a second.

CREPRC_FLAGS

Integer

Flags specified by theargument in the $CREPRC call that created the process.

CURPRIV

String

Current process privileges.

CURRENT_CAP_MASK

Integer

Current capabilities mask for the specified kernel thread. See the SET PROCESS/CAPABILITIES command for additional information.

DFPFC

Integer

Default page fault cluster size.

DFWSCNT

Integer

Default working set size.

DIOCNT

Integer

Remaining direct I/O quota.

DIOLM

Integer

Direct I/O limit quota.

DIRIO

Integer

Count of direct I/O operations for the process.

EFCS

Integer

Local event flags 0--31.

EFCU

Integer

Local event flags 32--63.

EFWM

Integer

Event flag wait mask.

ENQCNT

Integer

Lock request quota remaining.

ENQLM

Integer

Lock request quota limit.

EXCVEC

Integer

Address of a list of exception vectors.

FAST_VP_SWITCH

Integer

Number of times this process has issued a vector instruction that enabled an inactive vector processor without the expense of a vector context switch.

FILCNT

Integer

Remaining open file quota.

FILLM

Integer

Open file quota.

FINALEXC

Integer

Address of a list of final exception vectors.

FREP0VA

Integer

First free page at end of program region (P0space) (irrelevant if no image is running).

FREP1VA

Integer

First free page at end of control region (P1space).

FREPTECNT

Integer

Number of pages available for virtual memory expansion.

GPGCNT

Integer

Global page count in working set.

GRP

Integer

Group number of the user identification code (UIC).

HOME_RAD

Integer

Home resource affinity domain (RAD). RAD is supported on AlphaServer GS series systems and starting from OpenVMS Version 8.4, support is extended to NUMA capable Integrity servers.

IMAGECOUNT

Integer

Number of images that have been run down for the process.

IMAGE_AUTHPRIV

String

Authorized privilege mask of the installed image.

IMAGE_PERMPRIV

String

Permanent (default) privilege mask of the installed image.

IMAGE_WORKPRIV

String

Working (active) privilege mask of the installed image.

IMAGNAME

String

File name of the current image.

IMAGPRIV

String

Privileges with which the current image was installed.

INSTALL_RIGHTS

Integer

Binary content of the install rights list. This item code returns a list of install rights separated by commas.

INSTALL_RIGHTS_SIZE

Integer

Number of bytes needed to store the install rights.

JOBPRCCNT

Integer

Number of subprocesses owned by the job.

JOBTYPE

Integer

Execution mode of the process at the root ofthe job tree.

KT_LIMIT

Integer

Returns the per-process kernel threads limit for the process.

LAST_LOGIN_I

String

Time of your last interactive login (the value that was reported when you logged in).

LAST_LOGIN_N

String

Time of your last non-interactive login (thev alue that was reported when you logged in).

LOGIN_FAILURES

Integer

Number of login failures that occurred prior to the start of the current session (the value that was reported when you logged in).

LOGIN_FLAGS

Integer

A longword bitmask that contains additional information relating to the login sequence.

LOGINTIM

String

Process creation time.

MASTER_PID

String

Process identification (PID) number of the process at the top of the current job's process tree.

MAXDETACH

Integer

Maximum number of detached processes allowed the user who owns the process.

MAXJOBS

Integer

Maximum number of active processes allowed for the user who owns the process.

MEM

Integer

Member number of the UIC.

MODE

String

Current process mode (BATCH, INTERACTIVE, NETWORK,or OTHER).

MSGMASK

Integer

Current message mask as established by the SETMESSAGE command. If no mask is specified, the default system message mask is described in the $GETMSG system service. For additional information, seethe $PUTMSG system service (for message mask bits), and the F$ENVIRONMENTl exical MESSAGE item.

MULTITHREAD

Integer

Current setting for the process (limited by the system setting).

NODENAME

String

The name of the OpenVMS Cluster node on which the process is running.

NODE_CSID

Integer

Cluster ID of the OpenVMS Cluster node on which the process is running.

NODE_VERSION

String

Operating system version number of theOpenVMS Cluster node on which the process is running.

OWNER

String

Process identification number of process owner.

PAGEFLTS

Integer

Count of page faults.

PAGFILCNT

Integer

Remaining paging file quota.

PAGFILLOC

Integer

Location of the paging file.

PARSE_STYLE_PERM

String

Values that were set by $SET_PROCESS_PROPERTIESW.

PARSE_STYLE_IMAGE

String

Values that were set by $SET_PROCESS_PROPERTIESW.

PERMANENT_CAP_MASK

Integer

Permanent capabilities mask for the specified kernel thread. See the SET PROCESS/ CAPABILITIES command for additional information.

PERSONA_AUTHPRIV

String

Authorized privilege mask of the persona.

PERSONA_ID

Integer

The ID of the persona as a longword integer.

PERSONA_PERMPRIV

String

Permanent (default) privilege mask of the persona.

PERSONA_RIGHTS

Integer

Binary content of the persona rights list. This item code returns a list of persona rights separated by commas.

PERSONA_RIGHTS_SIZE

Integer

Number of bytes needed to store the persona rights.

PERSONA_WORKPRIV

String

Privilege mask of the working (active) persona.

PGFLQUOTA

Integer

Paging file quota (maximum virtual page count).

PHDFLAGS

Integer

Flags word.

PID

String

Process identification number.

PPGCNT

Integer

Process page count.

PRCCNT

Integer

Number of subprocesses owned by the process.

PRCLM

Integer

Subprocess quota.

PRCNAM

String

Process name.

PRI

Integer

Process's current priority.

PRIB

Integer

Process's base priority.

PROC_INDEX

Integer

Process's index number.

PROCESS_RIGHTS

String

Contents of the process's local rights list, including your UIC. This item code returns a list of identifier names separated by commas.

PROCPRIV

String

Process's default privileges.

RIGHTSLIST

String

Contents of all of the process rights lists; the equivalent of PROCESS_RIGHTS plus SYSTEM_RIGHTS. This item code returns a list of identifier names separated by commas.

RIGHTS_SIZE

Integer

Number of bytes required to buffer the rights list. The rights list includes both the system rights list and the process rights list.

SCHED_CLASS_NAME

String

Returns the name of the scheduling class if the process is class scheduled, null string if not.

SHRFILLM

Integer

Maximum number of open shared files allowed for the job to which the process belongs.

SEARCH_SYMLINK_PERM

String

Returns one of the following values:

NOWILDCARD

      WILDCARD

      NOELLIPSIS

SEARCH_SYMLINK_TEMP

String

Returns one of the following values:

NOWILDCARD

      WILDCARD

      NOELLIPSIS

SITESPEC

Integer

Per-process site-specific longword.

SLOW_VP_SWITCH

Integer

Number of times this process has issued a vector instruction that enabled an inactive vector processor with a full vector context switch.

STATE

String

Process state.

STS

Integer

First longword of process status flags.

STS2

Integer

Second longword of process status flags.

SUBSYSTEM_RIGHTS

Integer

Binary content of the subsystem rights list. This item code returns a list of subsystem rights separated by commas.

SUBSYSTEM_RIGHTS_SIZE

Integer

Number of bytes needed to store the subsystem rights.

SWPFILLOC

Integer

Location of the swap file.

SYSTEM_RIGHTS

String

Contents of the system rights list for the process. This item code returns a list of identifier names separated by commas.

SYSTEM_RIGHTS_SIZE

Integer

Number of bytes needed to store the system rights.

TABLENAME

String

File specification of the process's current command language interpreter (CLI) table.

TERMINAL

String

Login terminal name for interactive users (1--7 characters)

TMBU

Integer

Termination mailbox unit number.

TOKEN

String

Token size, specified as TRADITIONAL (255 bytes) or EXPANDED (4000 bytes).

TQCNT

Integer

Remaining timer queue entry quota.

TQLM

Integer

Timer queue entry quota.

TT_ACCPORNAM

String

Access port name for the terminal associated with the process.

TT_PHYDEVNAM

String

Physical device name of the terminal associated with the process.

UAF_FLAGS

Integer

User authorization file (UAF)flags from the UAF record of the user who owns the process.

UIC

String

Process's user identification code (UIC).

USERNAME

String

User name string (12 characters filled with trailing blanks).

VIRTPEAK

Integer

Peak virtual address size.

VOLUMES

Integer

Count of currently mounted volumes.

VP_CONSUMER

Boolean

Flag indicating whether the process is a vector consumer.

VP_CPUTIM

Integer

Total amount of time the process has accumulated as a vector customer.

WSAUTH

Integer

Maximum authorized working set size.

WSAUTHEXT

Integer

Maximum authorized working set extent.

WSEXTENT

Integer

Current working set extent.

WSPEAK

Integer

Working set peak.

WSQUOTA

Integer

Working set size quota.

WSSIZE

Integer

Process's current working set limit.


 

If you use the $GETJPI function to request information on the null processor the swapper process, you can specify any of the items Table 2.5, “F$GETJPI Items” except the following:


ACCOUNT

BYTLM

ENQCNT

ENQLM

EXCVEC

FILCNT

FILM

FINALEXC

IMAGNAME

LOGINTIM

MSGMASK

PAGFILCNT

PGFLQUOTA

PRCCNT

PRCLM

PROCPRIV

SITESPEC

TQCNT

TQLM

USERNAME

VIRTPEAK

VOLUMES

WSPEAK


Examples

-1


This example returns the value of the RAD. A value of "-1" indicates no RAD value is attributed to the queue.


 






F$GETSYI

F$GETSYI — Returns status and identification information about the local system (or abouta node in the local mixed-architecture OpenVMS Cluster system, if your system is part of an OpenVMS Cluster).

Format

F$GETSYI(item [,node-name] [,cluster-id])


Return Value

Either an integer or a character string, depending on the item you request.


Arguments

item


Specifies the node in your OpenVMS Cluster system for which information is to be returned. Specify the node as a character string expression. You cannot use the asterisk ( * ) and the percent sign (%) wildcard characters to specify the argument.


node-name


Specifies the node in your OpenVMS Cluster system for which information is to be returned. Specify the node as a character string expression. You cannot use the asterisk ( * ) and the percent sign (%) wildcard characters to specify the node-name argument.


cluster-id


Specifies the cluster node identification number for which the information is to be returned.


To get information for all the nodes in a cluster, use the F$CSID lexical function to obtain each cluster system identification number, and use the argument of F$GETSYI to gather information about each node.


Description

The F$GETSYI lexical function invokes the $GETSYI system service to return status and identification information about the local system (or about a node in the local OpenVMS Cluster, if your system is part of a cluster). The F$GETSYI function returns information on the items that can be specified with the $GETSYI


system service. For more information about the $GETSYI system service, see the HP OpenVMS System Services Reference Manual.


You can specify the node for which you want information by supplying either the or the argument, but not both.


Table 2.8, “F$GETSYI Items” lists the items you can specify with the F$GETSYI lexical function.


 

Table 2.8. F$GETSYI Items



Item

Return Type

Information Returned

ACTIVE_CPU_MASK

Integer

A value that represents a CPU- indexed bitvector. When a particular bit position is set, the processor with that CPU ID value is a

member of the instance's active set - those currently participating in the OpenVMS SMP scheduling activities.

ACTIVECPU_CNT

Integer

The count of CPUs actively participating in the current boot of a symmetric multiprocessing (SMP) system.

ARCHFLAG

Integer

Architecture flags for the system.

ARCH_NAME

String

Name of CPU architecture: Alpha for OpenVMS Alpha.

ARCH_TYPE

Integer

Type of CPU architecture; 1 for VAX, 2 for Alpha, and 3 for Integrity servers

AVAIL_CPU_MASK

Integer

A value that represents a CPU- indexed bitvector. When a particular bit position is set, the processor with that CPU ID value is a member of the instance's configure set - those owned by the partition and controlled by the issuing instance.

AVAILCPU_CNT

Integer

The count of CPUs recognized in the system.

BOOT_DEVICE

String

The name of the device from which the system was booted. For a system with a shadowed system disk, BOOT_DEVICE returns the name of the member device from which the shadow set was formed.

BOOTTIME

String

The time the system was booted.

CHARACTER_EMULATED

String

TRUE or FALSE to indicate whether the character string instructions are emulated on the CPU.

CLUSTER_EVOTES

Integer

Total number of votes in the cluster.

CLUSTER_FSYSID

String

System identification number for first node to boot in the cluster (the founding node). This number



is returned as a character string

containing a hexadecimal number.

CLUSTER_FTIME

String

The time when the first node in the cluster was booted.

CLUSTER_MEMBER

String

TRUE or FALSE if the node is a member of the local cluster.

CLUSTER_NODES

Integer

Total number of nodes in the cluster, as an integer.

CLUSTER_QUORUM

Integer

Total quorum for the cluster.

CLUSTER_VOTES

Integer

Total number of votes in the cluster.

CONSOLE_VERSION

String

Console firmware version.

CONTIG_GBLPAGES

Integer

Total number of free, contiguous global pages.

COMMUNITY_ID

Integer

The hardware community ID for the issuing instance within the hard partition. Supported only on AlphaServer systems that support partitioning.

CPU_AUTOSTART

Integer

A list of zeroes and ones, separated by commands and indexed by CPU ID. Any entry with a value of one indicates that specific CPU will be brought into the OpenVMS active set if it transitions into the current instance from outside, or is powered up while already owned.

CPU_FAILOVER

Integer

List of numeric partition IDs, separated by commas and indexed by CPU ID, that define the destination of the processor if

the current instance should crash. Supported only on AlphaServer systems that support partitioning.

CPUCAP_MASK

String

List of hexadecimal values, separated by commas and indexed by CPU ID. Each individual value represents a bitvector; when set, the corresponding user capability is enabled for that CPU.

CPUTYPE

Integer

On Alpha, the processor type, as stored in the hardware restart parameter block (HWRPB). The value of 2represents a DECchip 21064 processor.

CWLOGICALS

Boolean

Flag indicating that the clusterwide logical name database has been initialized on the CPU.

DECIMAL_EMULATED

String

TRUE or FALSE to indicate whether the decimal string



instructions are emulated on the

CPU.

DECNET_FULLNAME

String

The node name of a DECnet Phase IV system or the node full name of a DECnet-Plus system.

DECNET_VERSION

String

The information on the particular version and ECO level of the DECnet package installed on the local system. This item returns a string containing a hexadecimal number, using the following format:


      Byte 0 = Customer ECO


      Byte 1 = DECnet ECO


      Byte 2 = DECnet phase (4 for Phase IV, 5 for DECnet-Plus for OpenVMS)


      Byte 3 = Reserved


To distinguish Phase IV from DECnet-Plus for OpenVMS, use the byte containing the DECnet version (byte 2).


For additional information on interpreting byte 0 and byte 1, see the current HP DECnet-Plus for OpenVMS Release Notes documentation.

D_FLOAT_EMULATED

String

TRUE or FALSE to indicate whether the D_floating instructions are emulated on the CPU.

ERLBUFFERPAGES

Integer

Number of pagelets on Alpha and Integrity servers used for each S0 error log buffer.

ERLBUFFERPAG_S2

Integer

Number of system pagelets(on Alpha and Integrity servers used for each S2 error log buffer.)

ERRORLOGBUFF_S2

Integer

Number of S2 error log buffers.

ERRORLOGBUFFERS

Integer

Number of S0 error log buffers.

F_FLOAT_EMULATED

String

TRUE or FALSE to indicate whether th eF_floating instructions are emulated on the CPU.

FREE_GBLPAGES

Integer

Current count of free global pages.

FREE_GBLSECTS

Integer

Current count of free global section table entries.

FREE_PAGES

Integer

Total number of free pages.

G_FLOAT_EMULATED

String

TRUE or FALSE to indicate whether the G_floating instructions are emulated on the CPU.

DDAGGALAXY_ID

Integer

The 128-bit Galaxy ID. Supported only on AlphaServer GS series systems.

DDAGGALAXY_MEMBER

Integer

1 if member of a Galaxy sharing community, 0 if not. Supported only on AlphaServer GS series systems.

DDAGGALAXY_PLATFORM

Integer

1 if running on a Galaxy platform, 0 if not. Supported only on AlphaServer GS series systems.

DDAGGALAXY_SHMEMSIZE

Integer

The number of shared memory pages. If the current instance is not a member of a Galaxy, no shared memory is reported. Supported only on AlphaServer GS series systems.

DDAGGH_RSRVPGCNT

Integer

On Alpha, number of pages covered by granularity hints to reserve for use by the INSTALL utility after system startup has completed.

DDAGGLX_FORMATION

String

A time-stamp string when the Galaxy configuration, of which this instance is a member, was created. Supported only on AlphaServer GS series systems.

DDAGGLX_MAX_MEMBERS

Integer

The maximum count of instances that may join the current Galaxy configuration. Supported only on AlphaServer GS series systems.

GLX_MBR_MEMBER

Integer

A 64-byteinteger. Each 8 bytes represents a Galaxy member number, listed from 7 to0. The value is 1 if the instance is currently a member, 0 if not a member.

Supported only on AlphaServer GS series systems.

GLX_MBR_NAME

String

A string indicating the names which are known in the Galaxy membership. Supported only on AlphaServer GS series systems.

GLX_TERMINATION

String

A time-stamp string when the Galaxy configuration, of which this instance last was a member, was terminated. Supported only on AlphaServer GS series systems.

HP_ACTIVE_CPU_CNT

Integer

The count of CPUs in the hard partition that are not currently in firmware console mode. For OpenVMS, this implies that the CPU is in, or in the process of



joining,the active set in one of

the instances in the hard partition. Supported only on AlphaServer systems that support partitioning.

HP_ACTIVE_SP_CNT

Integer

The count of active operating system instances currently executing within the hard partition. Supported only on AlphaServer systems that support partitioning.

HP_CONFIG_SBB_CNT

Integer

A count of theexisting system building blocks within the current hard partition. Supported only on AlphaServer systems that support partitioning.

HP_CONFIG_SP_CNT

Integer

The maximumcount of soft partitions within the current hard partition. This countdoes not imply that an operating system instance is currently runningwithin any given soft partition. Supported only on AlphaServer systems that support partitioning.

HW_MODEL

Integer

An integer that identifies the Alpha node's model type. An integer greater than 1023 represents the Alpha operating system.

HW_NAME

String

The Alpha model name.

DDAGITB_ENTRIES

Integer

On Alpha, number of I-stream translation buffer entries that support granularity hints to be allocated for resident code.

DDAGMAX_CPUS

Integer

The maximum number of CPUs that could be recognized by this instance.

MEMSIZE

Integer

Number of pages of memory in the system configuration.

MODIFIED_PAGES

Integer

Total number of modified pages.

MULTITHREAD

Integer

Value of the MULTITHREAD system parameter.

NODENAME

String

Node name (does not include the following double colon).

NODE_AREA

Integer

The DECnet area for the target node.

NODE_CSID

String

The CSID of the specified node, as a string containing a hexadecimal number. The CSID is a form of system identification.

NODE_EVOTES

Integer

Number of votes allotted to the node.

NODE_HWVERS

String

Hardware version of the specified node.

NODE_NUMBER

Integer

The DECnet number for the specified node.

NODE_QUORUM

Integer

Quorum that the node has.

NODE_SWINCARN

String

Software incarnation number for the specified node. This number is returned as a string containing a hexadecimal number.

NODE_SWTYPE

String

Type of operating system software used by the specified node.

NODE_SWVERS

String

Software version of the specified node.

NODE_SYSTEMID

String

System identification number for the specified node. This number is returned as a string containing a hexadecimal number.

NODE_VOTES

Integer

Number of votes allotted to the node.

NPAGED_FREE

Integer

Number of free bytes in nonpaged pool.

NPAGED_INUSE

Integer

Total number of bytes currently being used in nonpaged pool.

NPAGED_LARGEST

Integer

Size of the largest contiguous area of free memory in nonpaged pool.

NPAGED_TOTAL

Integer

Total size (in bytes) of nonpaged pool.

PAGED_FREE

Integer

Number of free bytes in paged pool.

PAGED_INUSE

Integer

Total number of bytes currently being used in paged pool.

PAGED_LARGEST

Integer

Size of the largest contiguous area of free memory in paged pool.

PAGED_TOTAL

Integer

Total size (in bytes) of paged pool.

PAGEFILE_FREE

Integer

Number of free pages in the currently installed paging files.

PAGEFILE_PAGE

Integer

Number of pages in the currently installed paging files.

PAGE_SIZE

Integer

Indicates the number of bytes in a physical page.

PALCODE_VERSION

String

Version of the PALCODE(privileged architectural library) on your Alpha system.

PARTITION_ID

Integer

The soft partition ID. Supported only on AlphaServer systems that support partitioning.

POTENTIAL_CPU_MASK

Integer

A value that represents a CPU- indexed bitvector. When a particular



bit position is set, the processor

with that CPU ID value is a member of the instance's potential set. A CPU in the potential set implies that it could actively join the OpenVMS active set for this instance if it is ever owned by it. To meet this rule the CPU's characteristics must match hardware and software compatibility rules defined particularly for that instance.

POTENTIALCPU_CNT

Integer

The count of CPUs in the hard partition that are members of the potential set for this instance. A CPU in the potential set implies that it could actively joint he OpenVMS active set for this instance if it is ever owned by it. To meet this rule the CPU's characteristics must match hardware and software compatibility rules defined particularly for that instance.

POWERED_CPU_MASK

Integer

A value that represents a CPU- indexed bitvector. When a particular bit position is set, the processor with that CPU ID value is a member of the instance's powered set -those CPUs physically existing within the hard partition and powered up fo roperation.

POWEREDCPU_CNT

Integer

The count of CPUs in the hard partition that are physically powered up.

PRESENT_CPU_MASK

Integer

A value that represents a CPU- indexed bitvector. When a particular bit position is set, the processor with that CPU ID value is a member of the instance's present set -those CPUs physically existing within the hard partition. Being in the present set does not imply that it is part of the powered set.

PRESENTCPU_CNT

Integer

The count of CPUs in the hard partition that physically reside in a hardware slot.

PRIMARY_CPUID

Integer

The CPU ID of the primary processor for this OpenVMS instance.

QUANTUM

Integer

Maximum amount of processor time a process can receive while other processes are waiting.

RAD_CPUS

Integer

List of RAD, CPU pairs,separated by commas. RAD is supported on AlphaServer GS series systems and starting from OpenVMS Version 8.4, support is extended to NUMA capable Integrity servers.

RAD_MAX_RADS

Integer

The maximum number of RADS possible on this platform. RAD is supported on AlphaServer GS series systems and starting from OpenVMS Version 8.4, support is extended to NUMA capable Integrity servers.

RAD_MEMSIZE

Integer

List of RAD, PAGES pairs, separated by commas. RAD is supported on AlphaServer GS series systems and starting from OpenVMS Version 8.4, support is extended to NUMA capable Integrity servers.

RAD_SHMEMSIZE

Integer

List of RAD,PAGESpairs, separated by commas. RAD is supported on AlphaServer GS series systems and starting from OpenVMS Version 8.4, support is extended to NUMA capable Integrity servers.

REAL_CPUTYPE

Integer

The actual CPU type of the primary CPU of the system extracted from the hardware restart parameter block (HWRPB).

SCS_EXISTS

String

TRUE or FALSE to indicate whether the system communication subsystem (SCS) is currently loaded on a VMS node.

DDAGSCSNODE

String

The Galaxy instance name. Supported only on AlphaServer systems that support partitioning.

SID

Integer

System identification register. On Alpha, returns a value where all fields are zero except the CPU type field, which always contains the value of 256.

SWAPFILE_FREE

Integer

Number of free pages in the currently installed swapping files.

SWAPFILE_PAGE

Integer

Number of pages in the currently installed swapping files.

SYSTEM_RIGHTS

String

The contents of the system rights list on the local system. If you specify a remote system, a null string ("")is returned. This item



returns a list of identifier names separated by commas (,).

SYSTEM_UUID

Integer

The 128-bit Universal Unique Identifier (UUID) for the system.

SYSTYPE

Integer

On Alpha, the family or system hardware platform. For example, the integer 2 represents a DEC 4000, the integer 3 represents a DEC 7000 or DEC 10000, and the integer 4 represents a DEC 3000.

TOTAL_PAGES

Integer

Total number of physical memory pages.

USED_GBLPAGCNT

Integer

Number of pages currently in use in the global page table.

USED_GBLPAGMAX

Integer

Maximum number of pages ever in use in the global page table.

USED_PAGES

Integer

Total number of used pages.

VECTOR_EMULATOR

Boolean

Flag indicating the presence of the VAX vector instruction emulator facility (VVIEF) in the system.

VERSION

String

Version of OpenVMS in use (8- character stringfilled with trailing blanks).

VP_MASK

Integer

Mask indicating which processors in the system have vector coprocessors.

VP_NUMBER

Integer

Number of vector processors in the system.

 

DDAGAlpha only

SIntegrity servers only


Examples

$ SHOW SYMBOL RADCPU

0,0,0,1,1,4,1,5


 

This example uses the system parameter RAD_CPUS as an argument for the F$GETSYI function. This argument returns a list of R D,CPU pairs,separated by commas. In this example, the first RAD,CPU pair is 0,0, the second pair is 0,1, and so forth.


RAD is supported on AlphaServer GS series systems and starting from OpenVMS Version 8.4, support is extended to NUMA capable Integrity servers.







F$IDENTIFIER

F$IDENTIFIER — Converts an alphanumeric identifier to its integer equivalent, or converts an integer identifier to its alphanumeric equivalent. An identifier is a name or number that identifies a category of users. The system uses identifiers to determine a user's access to a resource.


Format

F$IDENTIFIER(identifier,conversion-type)


Return Value

An integer value if you are converting an identifier from a name to an integer. The F$IDENTIFIER function returns a string if you are converting an identifier from an integer to a name. If you specify an identifier that is not valid, the F$IDENTIFIER function returns a null string ("") (if you are converting from number to name) or a zero (if you are converting from name to number).


Arguments

identifier


Specifies the identifier to be converted. Specify the identifier as an integer expression if you are converting an integer to a name. Specify the identifier as a character string expression if you are converting a name to an integer.


Any identifier holding the Name Hidden attribute will cause the F$IDENTIFIER to return an error when you do not hold the identifier in question or do not have access to the rights database. For further information on the attribute, see the HP OpenVMS Guide to System Security


conversion-type


Indicates the type of conversion to be performed. If the argument is alphanumeric, specify the argument as a character string containing “NAME_TO_NUMBER”. If the argument is numeric, specify the argument as a character string containing “NUMBER_TO_NAME”.


Examples

$ UIC_INT= F$IDENTIFIER("SLOANE","NAME_TO_NUMBER")

$ SHOW SYMBOL UIC_INT

UIC_INT = 15728665 Hex = 00F00019 Octal = 00074000031

$ UIC = F$FAO("!%U",UIC_INT)

$ SHOW SYMBOL UIC

UIC = [360,031]


 

This example uses the F$IDENTIFIER to convert the member identifier from the UIC [MANAGERS,SLOANE] to an integer. The F$IDENTIFIER function shows that the member identifier SLOANE is equivalent to the integer 15728665. Note that you must specify the identifier SLOANE using uppercase letters.


To convert this octal number to a standard numeric user identification code (UIC), use the F$FAO function with the !%U directive. (This directive converts a longword to a UIC in named format.) In this example, the member identifier SLOANE is equivalent to the numeric UIC [360,031].


$ UIC_INT = (%O31 + (%X10000 * %O360))

$ UIC_NAME = F$IDENTIFIER(UIC_INT,"NUMBER_TO_NAME")

$ SHOW SYMBOL UIC_NAME

UIC_NAME = "ODONNELL"


This example obtains the alphanumeric identifier associated with the numeric UIC [360,031]. First, you must obtain the longword integer that corresponds to the UIC [360,031]. To do this, place the member number into the low-order word. Place the group number into the high-order word. Next, use the F$IDENTIFIER function to return the named identifier associated with the integer.







F$INTEGER

F$INTEGER — Returns the integer equivalent of the result of the specified expression.


Format

F$INTEGER(expression)


Return Value

An integer value that is equivalent to the specified expression.


Arguments

expression


Specifies the expression to be evaluated. Specify either an integer or a character string expression.


If you specify an integer expression, the F$INTEGER function evaluates the expression and returns the result. If you specify a string expression, the F$INTEGER function evaluates the expression, converts the resulting string to an integer, and returns the result.


After evaluating a string expression, the F$INTEGER function converts the result to an integer in the following way. If the resulting string contains characters that form a valid integer, the F$INTEGER function returns the integer value. If the string contains characters that do not form a valid integer, the F$INTEGER function returns the integer 1 if the string begins with T, t, Y, or y. The function returns the integer 0 if the string begins with any other character.

Example

$ A = "23"

$ B = F$INTEGER("-9" + A)

$ SHOW SYMBOL B

B = -923 Hex=FFFFFC65 Octal=176145


This example shows how to use the F$INTEGER function to equate a symbol to the integer value returned by the function. In the example, the F$INTEGER function returns the integer equivalent of the string expression ( “--9” + A). First, the F$INTEGER function evaluates the string expression by concatenating the string literal “--9” with the string literal “23”. Note that the value of the symbol A is substituted automatically in a string expression. Also note that the plus sign (+) is a string concatenation operator because both arguments are string literals.

After the string expression is evaluated, the F$INTEGER function converts the resulting character string ( “ – 923”) to an integer, and returns the value – 923. This integer value is assigned to the symbol B.







F$LENGTH

F$LENGTH — Returns the length of the specified character string.


Format

F$LENGTH(string)

Return Value

An integer value for the length of the string.


Arguments

string


Specifies the character string whose length is being determined. Specify the string argument as a character string expression.

Example

$ MESSAGE = F$MESSAGE(%X1C)

$ SHOW SYMBOL MESSAGE

MESSAGE = "%SYSTEM-F-EXQUOTA, exceeded quota"

$ STRING_LENGTH = F$LENGTH(MESSAGE)

$ SHOW SYMBOL STRING_LENGTH

STRING_LENGTH = 33 Hex = 00000021 Octal = 000041


The first assignment statement uses the F$MESSAGE function to return the message that corresponds to the hexadecimal value 1C. The message is returned as a character string and is assigned to the symbol MESSAGE.

The F$LENGTH function is then used to return the length of the character string assigned to the symbol MESSAGE. You do not need to use quotation marks ( “ ”) when you use the symbol MESSAGE as an argument for the F$LENGTH function. (Quotation marks are not used around symbols in character string expressions.)


The F$LENGTH function returns the length of the character string and assigns it to the symbol STRING_LENGTH. At the end of the example, the symbol STRING_LENGTH has a value equal to the number of characters in the value of the symbol named MESSAGE, that is, 33.







F$LICENSE (Alpha/Integrity servers Only)

F$LICENSE (Alpha/Integrity servers Only) — Checks whether the specified license is loaded on the system.


Format

F$LICENSE(license-name[,producer-name])


 

Return Value

A character string stating TRUE or FALSE.


Arguments

license-name


Specifies the name of the license for which you want to check the status.


producer-name


Specifies the name of the company that produced the license. By default, DEC is assumed to be the producer on Alpha systems and HP is assumed to be the producer on Integrity server systems. To find an exception, specify a different producer name.


Examples

$ IF F$LOCATE(":",TIME) .EQ. F$LENGTH(TIME) THEN - GOTO NO_COLON

This section of a command procedure compares the results of the F$LOCATE and F$LENGTH functions to see if they are equal. This technique is commonly used to determine whether a character or substring is contained in a string.


In the example, the INQUIRE command prompts for a time value and assigns the user-supplied time to the symbol TIME. The IF command checks for the presence of a colon (:) in the string entered in response to


the prompt. If the value returned by the F$LOCATE function equals the value returned by the F$LENGTH function, the colon is not present. You use the .EQ. operator (rather than .EQS.) because the F$LOCATE and F$LENGTH functions return integer values.


Note that quotation marks are used around the substring argument, the colon,because it is a string literal; however, the symbol TIME does not require quotation marks because it is automatically evaluated as a string expression.







F$MATCH_WILD

F$MATCH_WILD — Performs a wildcard matching between a candidate and a pattern string. TRUE is returned if the strings match.

 

Format

F$MATCH_WILD(candidate, pattern)


Arguments

candidate


A string to which the pattern string is compared.


pattern


A string on which a wildcard match is performed comparing the pattern to the candidate string.


Example

$ SYNCHRONIZE /entry='$ENTRY'

$ IF $STATUS THEN EXIT

$!

$ JOB_STATUS = $STATUS

$!

$ IF "%JOBDELETE" .EQS. F$MESSAGE (JOB_STATUS, "IDENT")

$   THEN
$   ! CODE

$   ELSE

$   IF "%JOBABORT" .EQS. F$MESSAGE (JOB_STATUS, "IDENT")

$     THEN
$     ! CODE

$   ELSE
$     ! CODE

$   ENDIF

$ ENDIF

.

.

.

This command procedure submits a batch job and waits for it to complete. Upon successful completion, the procedure exits. If the job completes unsuccessfully, more processing is done based on the termination status of the batch job.

The first command submits the command procedure IMPORTANT.COM. In the second command, the SYNCHRONIZE command tells the procedure to wait for the job to finish. The third command determines if the job completed successfully and, if so, the procedure exits. The next command saves the status in a symbol.

The first IF statement uses F$MESSAGE to determine whether the job was deleted before execution. If so, it does some processing, possibly to resubmit the job or to inform a user via MAIL.

The next IF statement uses F$MESSAGE to determine whether the job was deleted during execution. As a result, some cleanup or human intervention may be required, which would be done in the THEN block.

If neither IF statement was true, then some other unsuccessful status was returned. Other processing, which would be done in the block following the ELSE statement, might be required.







F$MODE

F$MODE — Returns a character string showing the mode in which a process is executing. The F$MODE function has no arguments, but must be followed by parentheses.

Format

F$MODE()

Return Value

The character string INTERACTIVE for interactive processes. If the process is noninteractive, the character string BATCH, NETWORK, or OTHER is returned. Note that the return string always contains uppercase letters.

Arguments

None.


Description

The lexical function F$MODE returns a character string showing the mode in which a process is executing. The F$MODE function has no arguments, but must be followed by parentheses.


The F$MODE function is useful in command procedures that must operate differently when executed interactively and noninteractively. You should include either the F$MODE function or the F$ENVIRONMENT function in your login command file to execute different commands for interactive terminal sessions and noninteractive sessions.


If you do not include the F$MODE function to test whether your login command file is being executed from an interactive process, and the login command file is executed from a noninteractive process (such as a batch job), the process may terminate if the login command file contains commands that are appropriate only for interactive processing.


 

A command procedure can use the F$MODE function to test whether the procedure is being executed during an interactive terminal session.
It can direct the flow of execution according to the results of this test.


Example

$ IF F$MODE() .NES. "INTERACTIVE" THEN GOTO NON_INT_DEF

$ INTDEF: ! Commands for interactive terminal sessions

.

$ EXIT

$ NON_INT_DEF: !Commands for noninteractive processes

.


This example shows the beginning of a login.com file that has two sets of initialization commands: one for interactive mode and one for non interactive mode (including batch and network jobs). The IF command compares the character string returned by F$MODE with the character string INTERACTIVE; if they are not equal, control branches to the label NON_INT_DEF. If the character strings are equal, the statements following the label INTDEF are executed and the procedure exits before the statements at NON_INT_DEF.







F$MULTIPATH

F$MULTIPATH — (Alpha/Integrity servers Only). Returns a specified item of information for a specific multipath-capable device.

Format

F$MULTIPATH(device-name,item,context-symbol)


Return Value

A character string containing the requested information.


Arguments

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 argument is evaluated, the F$MULTIPATH 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. Currently, the only valid item is MP_PATHNAME, which returns a string with the path name for the specified multipath-capable device.


context-symbol

Prior to the first use of F$MULTIPATH with MP_PATHNAME, the context symbol must be initialized to a value of 0. The F$MULTIPATH function is responsible for maintaining the value of the context symbol
.


 

Caution

Do not modify the context symbol value after it has been initialized to 0; doing so could result in unpredictable behavior of F$MULTIPATH.


Description

Invokes the $DEVICE_PATH_SCAN system service to return a specified item of information for a specific multipath-capable device.

The F$MULTIPATH lexical function also returns any error messages generated by the $DEVICE_PATH_SCAN system service. For more information about the $DEVICE_PATH_SCAN system service, see the HP OpenVMS System Services Reference Manual.

Example

$ XYZ = 0

$

$LOOP:

$ PATH = F$MULTIPATH( "$1$DGA12", "MP_PATHNAME", XYZ )

$ IF PATH .EQS. "" THEN GOTO EXIT

$ WRITE SYS$OUTPUT "path name= ’’PATH’"

$ GOTO LOOP

$

$EXIT:

$ EXIT

This example shows the use of F$MULTIPATH with the MP_PATHNAME item code. Note that the context symbol XYZ has been initialized to 0 outside of the loop. The output from this command procedure is shown below. When all paths for a given multipath device have been returned,the end of the list is signaled by the return of a blank path name.


path name = PGA0.5000-1FE1-0001-5782
path name = PGA0.5000-1FE1-0001-5783
path name = PGA0.5000-1FE1-0001-5781
path name = PGA0.5000-1FE1-0001-5784

path name = MSCP







F$PARSE

F$PARSE — Parses a file specification and returns either the expanded file specification or the particular file specification field that you request.


Format

F$PARSE(filespec [,default-spec] [,related-spec] [,field] [,parse-type])


Return Value

A character string containing the expanded file specification or the field you specify. If you do not provide a complete file specification for the argument, the F$PARSE function supplies defaults in the return string. For more information, see the Description section for this lexical function.


In most cases, the F$PARSE function returns a null string ("") if an error is detected during the parse. For example, a null string is returned if the file specification has incorrect syntax or if a disk or directory does not exist, making the file specification logically incorrect. However, when you specify a field name or the SYNTAX_ONLY parse type, F$PARSE returns the appropriate information.


Arguments

filespec


Specifies a character string containing the file specification to be parsed.


The file specification can contain the asterisk (*) and the percent sign (%) wildcard characters. If you use a wildcard character, the file specification returned by the F$PARSE function contains the wildcard.


default-spec


Specifies a character string containing the default file specification.


The fields in the default file specification are substituted in the output string if a particular field in the argument is missing. You can make
further substitutions in the argument by using the

argument.


related-spec


Specifies a character string containing the related file specification. The fields in the related file specification are substituted in the output string if a particular field is missing from both the and arguments.


field


Specifies a character string containing the name of a field in a file specification. Specifying the argument causes the F$PARSE function to return a specific portion of a file specification.


Specify one of the following field names (do not abbreviate):


NODE

Node name

DEVICE

Device name

DIRECTORY

Directory name

NAME

File name

TYPE

File type

VERSION

File version number


parse-type


Specifies the type of parsing to be performed. By default, the F$PARSE function verifies that the directory in the file specification exists on the device in the file specification; however, the existence of the directory is not verified if you provide a argument. Note that the device and directory can be explicitly given in one of the arguments, or can be provided by default.


Also, by default the F$PARSE function translates logical names if they are provided in any of the arguments. The F$PARSE function stops iterative translation when it encounters a logical name with the CONCEALED attribute.


You can change how the F$PARSE function parses a file specification by using one of the following keywords:



NO_CONCEAL

Ignores the “conceal” attribute in the translation of a logical name as part of the file specification; that is, logical name translation does not end when a concealed logical name is encountered.

SYNTAX_ONLY

The syntax of the file specification is checked without verifying that the specified directory exists on the specified device.


 

Description

The F$PARSE function parses file specifications by using the RMS service $PARSE. For more information on the $PARSE service, see the OpenVMS Record Management Services Reference Manual.


When you use the F$PARSE function, you can omit those optional arguments to the right of the last argument you specify. However, you must include commas (,) as placeholders if you omit optional arguments to the left of the last argument you specify.


If you omit the device and directory names in the argument, the F$PARSE function supplies defaults, first from the argument and second from the argument. If names are not provided by these arguments, the F$PARSE function uses your current default disk and directory.


If you omit the node name, the file name, the file type, or the version number, the F$PARSE function supplies defaults, first from the argument and second from the argument. (Note that the version number is not picked up from the argument.) If names are not provided by these arguments, the F$PARSE function returns a null specification for these fields.


The parse operation simply validates that the provided file specification is syntactically correct; it does not enforce file specification semantics. For example, fields such as the version number are verified to contain five or fewer numeric digits, optionally preceded by a hyphen (-), but are not range checked. File specification semantics are enforced by services such as Open and Create.


Examples

$ SHOW SYMBOL SPEC

SPEC = ".DAT"


In this example, the F$PARSE function is used to parse a file specification containing a node name. The F$PARSE function returns the file type .DAT for the file RUN.DAT at the remote node DENVER.







F$PID

F$PID — Returns a process identification (PID) number and updates the context symbol topoint to the current position in the system's process list.

Format

F$PID(context-symbol)

Return Value

A character string containing the PID of a process in the system's list of processes.

Arguments

context-symbol

Specifies a symbol that DCL uses to store a pointer into the system's list of processes. The F$PID function uses this pointer to return a PID.

Specify the context symbol by using a symbol. The first time you use the F$PID function in a command procedure, you should use a symbol that is either undefined or equated to the null string ("") or a context symbol that has been created by the F$CONTEXT function.

If the context symbol is undefined or equated to a null string, the F$PID function returns the first PID in the system's process list that it has the privilege to access. That is, if you have GROUP privilege and if the context symbol is null or undefined, the F$PID function returns the PID of the first process in your group. If you have WORLD privilege, the F$PID function returns the PID of the first process in the list. If you have neither GROUP nor WORLD privilege, the F$PID returns the first process that you own. Subsequent calls to F$PID return the rest of the processes on the system you are accessing.

If the context symbol has been created by the F$CONTEXT function, the F$PID function returns the first process name in the system's process list that fitst he criteria specified in the F$CONTEXT calls. Subsequent calls to F$PID return only the PIDs of those processes that meet the selection criteria set up by the F$CONTEXT function and that are accessible to your current privileges.


Description

The F$PID function returns a process identification (PID) number and updates the context symbol to point to the current position in the system's process list. You can step through all the processes on a system, or use the lexical function F$CONTEXT to specify selection criteria. The function F$CONTEXT is not required.


The PIDs returned by the F$PID function depend on the privilege of your process. If you have GROUP privilege, the F$PID function returns PIDs o processes in your group. If you have WORLD privilege, the F$PID function returns PIDs of all processes on the system. If you lack GROUP or WORLD privilege, the F$PID function returns only those processes that you own.


The F$CONTEXT function enables the F$PID function to retrieve processes from any node in a mixed-architecture OpenVMS Cluster system.


The first time you use the F$PID function, use a symbol that is either undefined or equated to the null string or to a context symbol that has been created by the F$CONTEXT function. This causes the F$PID function to return the first PID in the system's process list that you have the privilege to access. It also causes the F$PID function to initialize the argument.


Once the argument is initialized, each subsequent F$PID returns the next PID in sequence, using the selection criteria set up by the F$CONTEXT function, if any, and updates the context symbol. After the last PID in the process list is returned, the F$PID function returns a null string.


Example

$ CONTEXT = ""

$ START:

$ PID = F$PID(CONTEXT)

$ IF PID .EQS. "" THEN EXIT

$ SHOW SYMBOL PID

$ GOTO START


This command procedure uses the F$PID function to display a list of PIDs. The assignment statement declares the symbol CONTEXT, which is used as the argument for the F$PID function. Because CONTEXT is equated to a null string, the F$PID function returns the first PID in the process list that it has the privilege to access.


The PIDs displayed by this command procedure depend on the privilege of your process. When run with GROUP privilege, the PIDs of users in your group are displayed. When run with WORLD privilege, the PIDs of all users on the system are displayed. Without GROUP or WORLD privilege, only those processes that you own are displayed.







F$PRIVILEGE

F$PRIVILEGE — Returns a string value of either TRUE or FALSE, depending on whether your current process privileges match those specified in the argument. You can specify either the positive or negative version of a privilege.


Format

F$PRIVILEGE(priv-states)


Return Value

A character string containing the value TRUE or FALSE. The F$PRIVILEGE function returns the string FALSE if any one of the privileges in the argument list is false.


Arguments

priv-states


Specifies a character string containing a privilege, or a list of privileges separated by commas (,). For a list of process privileges, see the VSI OpenVMS Guide to System Security. Specify any one of the process privileges except [NO]ALL.


Description

Use the F$PRIVILEGE function to identify your current process privileges.


 

If “NO” precedes the privilege, the privilege must be disabled in order for the function to return a value of TRUE. The F$PRIVILEGE function checks each of the keywords in the specified list, and if the result for any one is false, the string FALSE is returned.


Example

$ PROCPRIV = F$PRIVILEGE("OPER,GROUP,TMPMBX,NONETMBX")

$ SHOW SYMBOL PROCPRIV

PROCPRIV = "FALSE"


The F$PRIVILEGE function is used to test whether the process has OPER, GROUP, and TMPMBX privileges and if you do not have NETMBX privileges.


The process in this example has OPER (operator), GROUP, TMPMBX (temporary mailbox), and NETMBX (network mailbox) privileges. Therefore, a value of FALSE is returned because the process has NETMBX privilege, but NONETMBX was specified in the priv-states list. Although the Boolean result for the other three keywords is true, the entire expression is declared false because the result for NONETMBX was false.







F$PROCESS

F$PROCESS — Obtains the current process name string. The F$PROCESS function has no arguments, but must be followed by parentheses.

Format

F$PROCESS()


Return Value

A character string containing the current process name.


Arguments

None.


Example

$ NAME = F$PROCESS()

$ SHOW SYMBOL NAME

NAME = "MARTIN"


In this example, the F$PROCESS function returns the current process name and assigns it to the symbol NAME.







F$SEARCH — Searches a directory file and returns the full file specification for a file you specify.


Format

F$SEARCH(filespec[,stream-id])


 

Return Value

A character string containing the expanded file specification for the argument. If the F$SEARCH function does not find the file in the directory,
the function returns a null string ("").


Arguments

filespec


Specifies a character string containing the file specification to be searched for. If the device or directory names are omitted, the defaults from your current default disk and directory are used. The F$SEARCH function does not supply defaults for a file name or type. If the version is omitted, the specification for the file with the highest version number is returned. If the argument contains the asterisk (*) or the percent sign (%) wildcard characters, each time F$SEARCH is called, the next file specification that agrees with the argument is returned. A null string is returned after the last file specification that agrees with the argument.


stream-id


Specifies a positive integer representing the search stream identification number.


The search stream identification number is used to maintain separate search contexts when you use the F$SEARCH function more than once and when you supply different arguments. If you use the F$SEARCH function more than once in a command procedure and if you also use different arguments, specify arguments to identify each search separately.


If you omit the argument, the F$SEARCH function starts searching at the beginning of the directory file each time you specify a different argument.


Description

The lexical function F$SEARCH invokes the RMS service $SEARCH to search a directory file and return the full file specification for a file you specify. The F$SEARCH function allows you to search for files in a directory by using the RMS service $SEARCH. For more information on the $SEARCH routine, see the OpenVMS Record Management Services Reference Manual.


You can use the F$SEARCH function in a loop in a command procedure to return file specifications for all files that match a argument containing an asterisk (*) or a percent sign (%) wildcard character. Each time the F$SEARCH function is executed, it returns the next file specification that matches the file specification that contains a wildcard character. After the last file specification is returned, the next F$SEARCH call returns a null string. When you use the F$SEARCH function in a loop, you must include an asterisk (*) or the percent sign (%) wildcard characters in the argument; otherwise, the F$SEARCH always returns the same file specification.


Note that you must maintain the context of the search stream in one of the following ways:


If you do not maintain the context of the search stream, you start a new search at the beginning of the directory file each time you specify a different argument.


Note

The lexical function F$SEARCH can return any file that matches the selection criteria you specify, and that exists in the directory at some time between the beginning and the end of the search. Files that are created, renamed, or deleted during the search may or may not be returned.


 

Examples

$ SHOW SYMBOL FILESPEC

FILESPEC = "TRNTO"smith password"::DKA1:[PROD]CARS.DAT"


This example uses the F$SEARCH function to return a file specification for a file at a remote node. The access control string is enclosed in quotation marks because it is part of a character string expression when it is an argument for the F$SEARCH function. To include quotation marks in a character string expression, you must use two sets of quotation marks.


Note that, when the F$SEARCH function returns a node name containing an access control string, it substitutes the word “password” for the actual user password.





F$SETPRV

F$SETPRV — Enables or disables specified user privileges. The F$SETPRV function returns a list of keywords indicating user privileges; this
list shows the status of the specified privileges before F$SETPRV was executed.

Format

F$SETPRV(priv-states)


 

Return Value

A character string containing keywords for the current process privileges before they were changed by the F

$SETPRV function.


Arguments

priv-states


Specifies a character string defining a privilege, or a list of privileges separated by commas (,). For a list of process privileges, see the VSI
OpenVMS User's Manual.

Description

The lexical function F$SETPRV invokes the $SETPRV system service to enable or disable specified user privileges. The F$SETPRV function returns a list of keywords indicating user privileges; this list shows the status of the specified privileges before F$SETPRV was executed.


Note

Your process must be authorized to set the specified privilege.


For detailed information on privilege restrictions, see the description of the $SETPRV system service in the VSI OpenVMS System Services Reference Manual.


The F$SETPRV function returns keywords for your current privileges, whether or not you are authorized to change the privileges listed in the argument; however, the F$SETPRV function enables or disables only the privileges you are authorized to change.


When you run programs or execute procedures that include the F$SETPRV function, be sure that F$SETPRV restores your process to its proper privileged state. For additional information, see the examples that follow.


Examples

SAVPRIV = "GROUP"

$ TEST = F$PRIVILEGE("GROUP")

$ SHOW SYMBOL TEST

TEST = "TRUE"


In this example, the process is not authorized to change the GROUP privilege; however, the F$SETPRV function still returns the current setting for the GROUP privilege.


 

The F$PRIVILEGE function is used to see whether the process has GROUP privilege. The return string, TRUE, indicates that the process has GROUP privilege, even though the F$SETPRV function attempted to disable the privilege.




F$STRING

F$STRING — Returns the string that is equivalent to the specified expression.


Format

F$STRING(expression)


Return Value

A character string equivalent to the specified expression.


Arguments

expression


The integer or string expression to be evaluated.


If you specify an integer expression, the F$STRING function evaluates the expression, converts the resulting integer to a string, and returns the result. If you specify a string expression, the F$STRING function evaluates the expression and returns the result.


When converting an integer to a string, the F$STRING function uses decimal representation and omits leading zeros. When converting a negative integer, the F$STRING function places a minus sign at the beginning string representation of the integer.


Example

$ A = 5

$ B = F$STRING(-2 + A)

$ SHOW SYMBOL B

B = "3"


The F$STRING function in this example converts the result of the integer expression (--2 + A) to the numeric string, “3”. First, the F$STRING function evaluates the expression (--2 + A). Note that 5, the value of symbol A, is automatically substituted when the integer expression is evaluated.


After the integer expression is evaluated, the F$STRING function converts the resulting integer, 3, to the string “3”. This string is assigned to the symbol B.






F$TIME

F$TIME — Returns the current date and time in absolute time format. The F$TIME function has no arguments, but must be followed
by parentheses.

Format

F$TIME()

Return Value

A character string containing the current date and time. The returned string has the following fixed, 23-character format:


 

dd-mmm-yyyy hh:mm:ss.cc

When the current day of the month is any of the values 1 to 9, the first character in the returned string is a blank character. The time portion of the string is always in character position 13, at an offset of 12characters from the beginning of the string.

Note that you must use the assignment operator (=) to preserve the blank character in the returned string. If you use the string assignment operator (:=), the leading blank is dropped.

Arguments

None.

Example

$ OPEN/WRITE OUTFILE DATA.DAT
$ TIME_STAMP = F$TIME()
$ WRITE OUTFILE TIME_STAMP

This example shows how to use the F$TIME function to time-stamp a file that you create from a command procedure. OUTFILE is the logical name for the file DATA.DAT, which is opened for writing. The F$TIME function returns the current date and time string, and assigns this string to the symbol TIME_STAMP. The WRITE command writes the date and time string to OUTFILE.






F$TRNLNM

F$TRNLNM — Translates a logical name and returns the equivalence name string or the requested attributes of the logical name specified.

Format

F$TRNLNM(logical-name [,table] [,index] [,mode] [,case] [,item])

Return value

The equivalence name or attribute of the specified logical name. The return value can be a character string or an integer, depending on the arguments you specify with the F$TRNLNM function. If no match is found, a null string ("") is returned.

Arguments

logical-name



Specifies a character string containing the logical name to be translated.


table


Specifies a character string containing the logical name table or tables that the F$TRNLNM function should search to translate the logical name. The table argument must be a logical name that translates to a logical name table or to a list of table names.


A logical name for a logical name table must be defined in one of the following logical name tables:



Note

 

If you subsequently create a table using the CREATE/NAME_TABLE command and want to make your private table accessible for F$TRNLNM, you must redefine one of the table logical names to include your private table. To see all the tables that are normally searched by F$TRNLNM, issue the following command:


$ SHOW LOGICAL/STRUCTURE LNM$DCL_LOGICAL


For more information, see the CREATE/NAME_TABLE amd SHOW LOGICAL commands.


If you do not specify a table, the default value is LNM$DCL_LOGICAL. That is, the F$TRNLNM function searches the tables whose names are equated to the logical name LNM$DCL_LOGICAL. Unless LNM$DCL_LOGICAL has been redefined for your process, the F$TRNLNM function searches the process, job, group, and system logical name tables, in that order, and returns the equivalence name of the first match found.


index


Specifies the number of the equivalence name to be returned if the logical name has more than one translation. The index refers to the equivalence strings in he order the names were listed when the logical name was defined.


The index begins with zero; that is, the first name in a list of equivalence names is referenced by the index zero. If you do not specify the argument, the default is zero.


mode


Specifies a character string containing one of the following access modes for the translation: USER (default), SUPERVISOR, EXECUTIVE, or KERNEL.


The F$TRNLNM function starts by searching for a logical name created with the access mode specified in the argument. If it does not find a match, the F$TRNLNM function searches for the name created with each inner access mode and returns the first match found. For example, two logical names can have the same name, but one name can be created with user access mode and the other name with executive access mode. If the argument is USER, the F$TRNLNM function returns the equivalence string for the user-mode,not the executive- mode, logical name.


case


Specifies the type of translation to be performed. The case argument controls both the case of the translation and whether the translation is to be interlocked or noninterlocked.


You can specify the case argument as any combination of CASE_BLIND(default), CASE_SENSITIVE, NONINTERLOCKED (default), and INTERLOCKED.


If the translation is case blind, the F$TRNLNM searches the logical name table for the first occurrence of the logical name, regardlessof the case, and returns the translation. If no match is found for either case, the function returns a null string ("").


If the translation is case sensitive, the F$TRNLNM function searches only for a logical name with characters of the same case as the argument. If no exact match is found, the F$TRNLNM function returns a null string ("").


If the translation is interlocked, the F$TRNLNM function does not take effect until all clusterwide logical name modifications in progress complete. Then, if a match is found, the result of the translation is returned. If no match is found, the F$TRNLNM function returns a nullstring ("").


If the translation is noninterlocked, the F$TRNLNM function takes effect immediately. If a match is found, the result of the translation is returned. If no match is found, the F$TRNLNM function returns a null string ("").


item


 

Specifies a character string containing the type of information that F$TRNLNM should return about the specified logical name. Specify one of the following items:


Item

Return Type

Information Returned

ACCESS_MODE

String

One of the following access modes associated with the logical name: USER, SUPERVISOR, EXECUTIVE, KERNEL.

CLUSTERWIDE

String

TRUE or FALSE to indicate whether the logical name is in a clusterwide name table.

CONCEALED

String

TRUE or FALSE to indicate whether the CONCEALED attribute was specified with the / TRANSLATION_ATTRIBUTES

qualifier when the logical name was created. The CONCEALED attribute is used to create a concealed logical name.

CONFINE

String

TRUE or FALSE to indicate whether the logical name is confined. If the logical name is confined (TRUE), then the name is not copied to subprocesses. If the logical name is not confined

(FALSE),then the name is copied to subprocesses.

CRELOG

String

TRUE or FALSE to indicate whether the logical name was created with the $CRELOG system service or with the $CRELNM system service, using the CRELOG attribute.


If the logical name was created with the $CRELOG system service or with the $CRELNM system service, using the CRELOG attribute, then TRUE is returned. Otherwise, FALSE is returned.

LENGTH

Integer

Length of the equivalence name associated with the specified logical name. If the logical name has more



than one equivalence name, the F

$TRNLNM function returns the length of the name specified by the index argument.

MAX_INDEX

Integer

The largest index defined for the logical name. The index shows how many equivalence names are associated with a logical name.

The index is zero based; that is, the index zero refers to the first name in a list of equivalence names.

NO_ALIAS

String

TRUE or FALSE to indicate whether the logical name has the NO_ALIAS attribute. The

NO_ALIAS attribute means that a logical name must be unique within outer access mode.

TABLE

String

TRUE or FALSE to indicate whether the logical name is the name of a logical name table.

TABLE_NAME

String

Name of the table where the logical name was found.

TERMINAL

String

TRUE or FALSE to indicate whether the TERMINAL attribute was specified with the / TRANSLATION_ATTRIBUTES

qualifier when the logical name was created. The TERMINAL attribute indicates that the logical name is not a candidate for iterative translation.

VALUE

String

Default. The equivalence name associated with the specified logical name. If the logical name has more than one equivalence name, the F$TRNLNM function returns

the name specified by the index argument.


 

Description

The lexical function F$TRNLNM uses the $TRNLNM system service to translate a logical name and return the equivalence name string, or the requested attributes of the logical name specified. The translation is not iterative;the equivalence string is not checked to determine whether it is a logical name.

When you use the F$TRNLNM function, you can omit optional arguments that can be used to the right of the last argument you specify. However, you must include commas (,) as placeholders if you omit optional arguments to the left of the last argument that you specify.

You can use the F$TRNLNM function in command procedures to save the current equivalence of a logical name and later restore it. You can also use it to test whether logical names have been assigned.

Examples

$ TYPE = F$TYPE(CTX)

$ SHOW SYMBOL TYPE

TYPE = "PROCESS_CONTEXT"

$ x = F$CONTEXT("PROCESS",CTX,"CANCEL")

$ TYPE = F$TYPE(CTX)

$ SHOW SYMBOL TYPE

TYPE = ""


 

In this example, the F$TYPE function returns the string PROCESS_CONTEXT because the symbol has been produced by a call to the F$CONTEXT function with a context type of PROCESS. The symbol returns this type until F$CONTEXT is called with the symbol and the argument value CANCEL.







F$UNIQUE (Alpha/Integrity servers Only)

F$UNIQUE (Alpha/Integrity servers Only) — Generates a string that is suitable to be a file name and is guaranteed to be unique across the cluster. Unique file names can be useful when creating temporary files. (See CLOSE/ DISPOSITION for an example.) The F$UNIQUE function has no arguments, but must be followed by a blank pair of parentheses.


Format

F$UNIQUE()


Return Value

A character string containing the unique string.


Arguments

None.


Examples

$ DIRECTORY

Directory WORK1:[TEST] 594B53554C421C9C11D75463D61F58B7.DAT;1

Total of 1 file.

$

$ CLOSE/DISPOSITION=DELETE TEMP_FILE

$ DIRECTORY

%DIRECT-W-NOFILES, no files found

$


The first command creates a temporary file and gives it a unique name, which is displayed by the subsequent DIRECTORY command. After the file is later closed and deleted, it no longer shows up in the directory.





F$USER

F$USER — Returns the current user identification code (UIC) in named format as a character string. The F$USER function has no arguments, but must be followed by parentheses.

 

Format

F$USER()

Return Value

A character string containing the current UIC, including brackets ([ ]). The UIC is returned in the format [group- identifier,member-identifier].

Arguments

None.


Example

$ UIC = F$USER()

$ SHOW SYMBOL UIC

UIC = "[GROUP6,JENNIFER]"

In this example, the F$USER function returns the current user identification code and assigns it to the symbol UIC.






F$VERIFY

F$VERIFY — Returns an integer value indicating whether the procedure verification setting is currently on or off. If used with arguments, the F$VERIFY function can turn the procedure and image verification settings on or off. You must include the parentheses after the F$VERIFY function whether or not you specify arguments.


Format

F$VERIFY([procedure-value] [,image-value])

Return Value

The integer 0 if the procedure verification setting is off, or the integer 1 if the procedure verification setting is on.


Arguments

procedure-value

Specifies an integer expression with a value of 1 to turn procedure verification on, or a value of 0 to turn procedure verification off.


When procedure verification is on, each DCL command line in the command procedure is displayed on the output device. Procedure verification allows you to verify that each command is executing correctly.

If you use the argument, the function first returns the current procedure verification setting. Then the command interpreter turns the procedure verification on or off, as specified by the argument.


image-value

Specifies an integer expression with a value of 1 to turn image verification on, or a value of 0 to turn image verification off.

When image verification is on, data lines in the command procedure are displayed on the output device.

Description

 

The lexical function F$VERIFY returns an integer value indicating whether the procedure verification setting is currently on or off. If used with arguments,the F$VERIFY function can turn the procedure and image verification settings on or off. You must include the parentheses after the F$VERIFY function whether or not you specify arguments.

Using the F$VERIFY function in command procedures allows you to test the current procedure verification setting. For example, a command procedure can save the current procedure verification setting before changing it and then later restore the setting. In addition, you can construct a procedure that does not display (or print) commands, regardless of the initial state of verification.

When you use the F$VERIFY function, you can specify zero, one, or two arguments. If you do not specify any arguments, neither of the verification settings is changed. If you specify only the argument, both procedure and image verification are turned on (if the value is1) or off (if the value is 0).

If you specify both arguments, procedure and image verification are turned on or off independently. If you specify the argument alone, only image verification is turned on or off. If you specify the argument alone, you must precede the argument with a comma (,).


You can also use the F$ENVIRONMENT function with VERIFY_PROCEDURE or VERIFY_IMAGE as the argument. With the F$ENVIRONMENT function, you can determine either the procedure or image verification setting; the F$VERIFY function determines only the procedure verification setting.

DCL performs the F$VERIFY function even if it appears after a comment character, if it is enclosed in single quotation marks (` '). This is the only processing that DCL performs within a comment.

Example

.

$ IF VERIFY .EQ. 1 THEN SET VERIFY


This example shows an excerpt from a command procedure that uses the F$VERIFY function to save the current procedure verification setting and to turn both procedure and image verification off. At the end of the command procedure, if procedure verification was originally on, both the procedure and image verification are turned on.