[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here HP OpenVMS DCL Dictionary

HP OpenVMS DCL Dictionary


Previous Contents Index

In this example, the F$GETQUI lexical function is used to obtain the size in blocks of print job 1347. The value returned reflects the total number of blocks occupied by the files associated with the job.

#2

$ IF F$GETQUI("DISPLAY_QUEUE", "QUEUE_STOPPED", "VAX1_BATCH") .EQS.
"TRUE" THEN GOTO 500
      

In this example, the F$GETQUI lexical function is used to return a value of TRUE or FALSE depending on whether the queue VAX1_BATCH is in a stopped state. If VAX1_BATCH is not in the system, F$GETQUI returns a null string ("").

#3

! This command procedure shows all queues and the jobs in them.
$  TEMP = F$GETQUI("")
$  QLOOP:
$  QNAME = F$GETQUI("DISPLAY_QUEUE","QUEUE_NAME","*")
$  IF QNAME .EQS. "" THEN EXIT
$  WRITE SYS$OUTPUT ""
$  WRITE SYS$OUTPUT "QUEUE: ", QNAME
$  JLOOP:
$  NOACCESS = F$GETQUI("DISPLAY_JOB","JOB_INACCESSIBLE",,"ALL_JOBS")
$  IF NOACCESS .EQS. "TRUE" THEN GOTO JLOOP
$  IF NOACCESS .EQS. "" THEN GOTO QLOOP
$  JNAME = F$GETQUI("DISPLAY_JOB","JOB_NAME",,"FREEZE_CONTEXT")
$  WRITE SYS$OUTPUT "    JOB:  ", JNAME
$  GOTO JLOOP
      

This sample command procedure displays all the queues in the system and all the jobs to which the user has read access in the system. In the outer loop a wildcard display queue operation is performed. No call is made to establish the right to obtain information about the queue, because all users have implicit read access to queue attributes. Because a wildcard queue name is specified ("*"), wildcard queue context is maintained across calls to F$GETQUI.

In the inner loop, to obtain information about all jobs, we enter nested wildcard mode from wildcard display queue mode. In this loop, a call is made to establish the right to obtain information about these jobs because users do not have implicit read access to jobs. The FREEZE_CONTEXT keyword is used in the request for a job name to prevent the advance of the wildcard context to the next object. After the job name has been retrieved and displayed, the procedure loops back up for the next job. The context is advanced because the procedure has not used the FREEZE_CONTEXT keyword. The wildcard queue context is dissolved when the list of matching queues is exhausted. Finally, F$GETQUI returns a null string ("") to denote that no more objects match the specified search criteria.

#4

$ THIS_NODE = F$EDIT(F$GETSYI("SCSNODE"),"COLLAPSE")
$ TEMP = F$GETQUI("CANCEL_OPERATION")
$ SET NOON
$LOOP:
$ QUEUE = F$GETQUI("DISPLAY_QUEUE","QUEUE_NAME","*","WILDCARD")
$ IF QUEUE .EQS. "" THEN GOTO ENDLOOP
$ IF THIS_NODE .EQS.-
F$GETQUI("DISPLAY_QUEUE","SCSNODE_NAME","*","WILDCARD,FREEZE_CONTEXT")
$ THEN
$    IF .NOT.-
  F$GETQUI("DISPLAY_QUEUE","QUEUE_AUTOSTART","*","WILDCARD,FREEZE_CONTEXT")-
  THEN START/QUEUE 'QUEUE'
$ ENDIF
$ GOTO LOOP
$ENDLOOP:
$ SET ON

      

This command procedure looks at all queues associated with the local cluster node and starts any queue that is not marked as autostart.

The procedure starts by obtaining the nodename of the local system and clearing the F$GETQUI context. In addition, error handling is turned off for the loop so that, if a queue had been started previously, the resulting error from the START QUEUE command does not abort the command procedure.

Inside the loop, the F$GETQUI function gets the next queue name in the queue list. If the result is empty, then it has reached the end of the list and it exits the loop.

The next IF statement checks to see if the queue runs on the local node. If it does, then the next statement checks to see if the queue is marked as an autostart queue. If that is false, then the queue is started with the start command. The loop is then repeated.

The final command of the procedure restores DCL error handling to the previous setting.

#5

$  IF p1.EQS."" THEN INQUIRE p1 "Queue name"
$  TEMP = F$GETQUI("")
$  QLOOP:
$    QNAME = F$GETQUI("DISPLAY_QUEUE","QUEUE_NAME",p1,"WILDCARD")
$    IF QNAME .EQS. "" THEN EXIT
$    WRITE SYS$OUTPUT ""
$    WRITE SYS$OUTPUT "QUEUE: ", QNAME
$    JLOOP:
$      RETAINED = F$GETQUI("DISPLAY_JOB","JOB_RETAINED",,"ALL_JOBS")
$      IF RETAINED .EQS. "" THEN GOTO QLOOP
$      Entry = F$GETQUI("DISPLAY_JOB","ENTRY_NUMBER",,"FREEZE_CONTEXT,ALL_JOBS")
$      WRITE SYS$OUTPUT "    Entry: ''Entry' Retained: ''RETAINED'"
$      IF RETAINED.EQS."TRUE" THEN DELETE/ENTRY='Entry'
$    GOTO JLOOP
      

This command procedure deletes all retained entries from a nominated queue or queues. Wildcards are allowed.

#6

$ WRITE SYS$OUTPUT F$GETQUI("DISPLAY_QUEUE","RAD","BATCHQ1")
 -1
      

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

F$GETSYI

Returns status and identification information about the local system (or about a 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

Indicates the type of information to be reported about the local node (or about another node in your OpenVMS Cluster, if your system is part of an OpenVMS Cluster). Specify the item as a character string expression.

You can also specify any of the system parameters listed in the HP OpenVMS System Management Utilities Reference Manual.

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 cluster-id 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, refer to the HP OpenVMS System Services Reference Manual.

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

Table DCLI-10 lists the items you can specify with the F$GETSYI lexical function.

Table DCLI-10 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, VAX for OpenVMS VAX.
ARCH_TYPE Integer Type of CPU architecture; 1 for VAX, 2 for Alpha.
++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.
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.
++CONSOLE_VERSION String Console firmware version.
CONTIG_GBLPAGES Integer Total number of free, contiguous global pages.
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.
++COMMUNITY_ID Integer The hardware community ID for the issuing instance within the hard partition. Supported only on AlphaServer systems that support partitioning.
+CPU Integer On VAX, the processor type, as represented in the processor's system identification (SID) register. For example, the integer 1 represents a VAX-11/780 and the integer 6 represents a VAX 8530, VAX 8550, VAX 8700, or VAX 8800.
++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 2 represents 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 hexidecimal 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, refer to 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.
ERRORLOGBUFFERS Integer Number of system pages (on VAX) or pagelets (on Alpha) to be used as errorlog buffers.
F_FLOAT_EMULATED String TRUE or FALSE to indicate whether the F_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.
++GALAXY_ID Integer The 128-bit Galaxy ID. Supported only on AlphaServer GS series systems.
++GALAXY_MEMBER Integer 1 if member of a Galaxy sharing community, 0 if not. Supported only on AlphaServer GS series systems.
++GALAXY_PLATFORM Integer 1 if running on a Galaxy platform, 0 if not. Supported only on AlphaServer GS series systems.
++GALAXY_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.
++GH_RSRVPGCNT Integer On Alpha, number of pages covered by granularity hints to reserve for use by the INSTALL utility after system startup has completed.
++GLX_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.
++GLX_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-byte integer. Each 8 bytes represents a Galaxy member number, listed from 7 to 0. 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 the existing system building blocks within the current hard partition. Supported only on AlphaServer systems that support partitioning.
++HP_CONFIG_SP_CNT Integer The maximum count of soft partitions within the current hard partition. This count does not imply that an operating system instance is currently running within any given soft partition. Supported only on AlphaServer systems that support partitioning.
HW_MODEL Integer An integer that identifies the node's Alpha or VAX model type. An integer greater than 1023 represents the Alpha operating system and an integer less than or equal to 1023 represents the VAX operating system.
HW_NAME String The Alpha or VAX model name.
++ITB_ENTRIES Integer On Alpha, number of I-stream translation buffer entries that support granularity hints to be allocated for resident code.
++MAX_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.
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 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.
++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 for operation.
++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. Supported only on AlphaServer GS series systems.
++RAD_MEMSIZE Integer List of RAD,PAGES pairs, separated by commas. Supported only on AlphaServer GS series systems.
++RAD_MAX_RADS Integer The maximum number of RADS possible on this platform. Supported only on AlphaServer GS series systems.
++RAD_SHMEMSIZE Integer List of RAD,PAGES pairs, separated by commas. Supported only on AlphaServer GS series systems.
++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 VAX node.
++SCSNODE 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 (,).
++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 string filled 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.

+VAX specific.
++Alpha specific.


Examples

#1

$ SYSID = F$GETSYI("SID")
$ SHOW SYMBOL SYSID
  SYSID = 19923201  Hex = 01300101 Octal = 000401
      


Previous Next Contents Index