[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

The REPLY/STATUS command in this example requests that the operator terminal status for terminal OPA0 be displayed. The response from OPCOM indicates that terminal OPA0 is enabled to receive messages from disk devices.

#6

$ REPLY/BELL/TERMINAL=TTC1: "YOUR FILE HAS COMPLETED PRINTING. BOB S."

      

The REPLY command in this example sends a message to the user logged in at terminal TTC1. When the message displays, a bell rings at that terminal.

#7

$ REPLY/ENABLE
%OPCOM, 24-DEC-2001 10:22:19.75, operator status for operator OPA0
CENTRAL, PRINTER, TAPES, DISKS, DEVICES, CARDS, NETWORK, CLUSTER,
LICENSE, OPER11, OPER12

   .
   .
   .
$ REPLY/DISABLE=(PRINTER, TAPES)
%OPCOM, 24-DEC-2001 10:22:26.07, operator disabled, operator OPA0

      

The REPLY/ENABLE command in this example designates terminal OPA0 to receive messages from all facilities. Later, the REPLY/DISABLE command selectively disables OPA0 from receiving messages pertaining to print devices and tapes.


REQUEST

Displays a message at a system operator's terminal and optionally requests a reply. All messages are logged at the operator's console and in the operator's log file, if that file is initialized.

To use this command, you must start the operator communication process (OPCOM) at boot time by specifying the DCL command @SYS$SYSTEM:STARTUP OPCOM in the site-specific startup command file, SYS$MANAGER:SYSTARTUP.COM.


Format

REQUEST message-text


Parameter

message-text

Specifies the text of the message to be displayed. The string can be up to 128 characters. If the string contains spaces, special characters, or lowercase characters, enclose it in quotation marks (" ").

Description

When you use the REQUEST command to send a message to an operator, the message is displayed at the operator terminals specified with the /TO qualifier.

If you specify the /REPLY qualifier, the message is assigned an identification number, so the operator can respond to the message. The system displays the following message:


%OPCOM-S-OPRNOTIF, operator notified, waiting...hh:mm:ss

When the operator responds to your request, the system displays a message such as the following:


%OPCOM-S-OPREPLY, message text entered by operator

If you request a reply, you cannot enter any commands until the operator responds. If you press Ctrl/C, the system displays the following message:


REQUEST - Enter message or cancel with ^Z
REQUEST - Message?

At this time, you can either enter another message, or press Ctrl/Z to cancel the request. If you enter another message, that message is sent to the operator, and you must continue to wait for a reply.

All messages are logged at the central operator's console and in the system operator's log file, if that file is initialized.


Qualifiers

/REPLY

Requests a reply to the message and issues a unique identification number to which the operator sends the response. The system displays a message that the operator has been notified; you cannot enter any commands until the operator responds. If you press Ctrl/C before the operator responds, you can then enter another message to the operator, or press Ctrl/Z to cancel the request.

/TO=(operator[,...])

Specifies one or more operators to whom you want to send the message. Possible keywords are as follows:
CARDS Sends the message to operators designated to respond to card reader requests.
CENTRAL Sends the message to the central system operator.
CLUSTER Sends the message to operators designated to respond to cluster-related requests.
DEVICES Sends the message to operators who mount and dismount disks.
DISKS Sends the message to operators who mount and dismount disk volumes.
NETWORK Sends the message to the network operator.
OPER1 to OPER12 Sends the message to operators identified as OPER1 to OPER12.
PRINTER Sends the message to operators designated to handle print requests.
SECURITY Sends the message to operators designated to respond to security-related requests.
TAPES Sends the message to operators designated to mount and dismount tape volumes.

Examples

#1

$ PRINT/COPIES=2/QUEUE=LQ_PRINT  REPORT.OUT/FORM=LETTER
  Job REPRT (queue LQA1, entry 401) pending
$ REQUEST/REPLY/TO=PRINTER -
_$"Have queued job 401 as FORM=LETTER;  can you print it?"
%OPCOM-S-OPRNOTIF, operator notified, waiting...10:42:16.10
%OPCOM-S-OPREPLY, AFTER 11:00
 14-DEC-2001 10:25:32.40, request 3 completed by operator OPA0
      

In this example the PRINT command requests that multiple copies of a file be printed using a special paper (/FORM=LETTER). After queueing the job to the printer, the REQUEST command sends a message to the system operator.

The operator sends a reply after completing the request.

#2

$ REQUEST/REPLY  "Are you there?"
%OPCOM-S-OPRNOTIF, operator notified, waiting...14:54:30.33
[Ctrl/C]
REQUEST-Enter message or cancel request with ^Z
REQUEST-Message?[Ctrl/Z]
%OPCOM-S-OPRNOTIF, operator notified, waiting... 14:59:01.38
%OPCOM-F-RQSTCAN, request was canceled
      

In this example the REQUEST command issues a message and requests a response. When no operator replies to the question, Ctrl/C is used to interrupt the request; then Ctrl/Z is used to cancel it.


RETURN

Terminates a GOSUB subroutine procedure and returns control to the command following the calling GOSUB command.

Format

RETURN [status-code]


Parameter

status-code

Defines a longword (integer) value or expression equivalent to an integer value that gives the exit status of the subroutine by defining a numeric value for the reserved global symbol $STATUS. The value can be tested by the next outer command level. The low-order 3 bits of the longword integer value change the value of the reserved global symbol $SEVERITY. If you specify a status code, DCL interprets the code as a condition code. Note that even numeric values produce warning, error, and fatal error messages, and that odd numeric values produce either no message or a success or informational message.

If you do not specify a status code, the current value of $STATUS is saved. When control returns to the outer command level, $STATUS contains the status of the most recently executed command or program.


Description

The RETURN command terminates the GOSUB subroutine and returns control back to the command following the calling GOSUB command.

When a DCL command, user program, or command procedure completes execution, the command interpreter saves the condition code value in the global symbol $STATUS. The system maintains this value in hexadecimal. If a RETURN command does not explicitly set a value for $STATUS, the command interpreter uses the current value of $STATUS to determine the error status.

The low-order 3 bits of the status value contained in $STATUS represent the severity of the condition. The reserved global symbol $SEVERITY contains this portion of the condition code. Severity values range from 0 to 4, as shown in the following table:

Value Severity
0 Warning
1 Success
2 Error
3 Information
4 Severe (fatal) error

Note that the success and information codes have odd numeric values, and that warning and error codes have even numeric values.


Example


$ SHOW TIME
  15-DEC-2001 14:25:42
$ GOSUB SYMBOL
$ EXIT
$ SYMBOL:
$     SHOW SYMBOL RED
      RED = "SET DEFAULT [LOWE.DCL]"
$     RETURN 1
      

The GOSUB command transfers control to the subroutine labeled SYMBOL. After the subroutine is executed, the RETURN command transfers control back to the command following the calling GOSUB statement, giving $STATUS and $SEVERITY a value of 1. The procedure then exits.


RUN (Image)

Executes an image within the context of your process. You can abbreviate the RUN command to a single letter, R.

Note

If you are invoking an image that requires one or more parameters, you must use the Automatic Foreign Command format or the Foreign Command format. Refer to the OpenVMS User's Manual for additional information.

Format

RUN filespec


Parameter

filespec

Specifies an executable image to be executed. The file type defaults to .EXE. The asterisk (*) and the percent sign (%) wildcard characters are not allowed.

Description

This command executes an image within the context of your process. You can abbreviate the RUN command to a single letter, R.

When working with installed images, if you specify an image name in the command line with an explicit version number (or a semicolon), the image runs with current process privileges. If you do not specify an explicit version number (or semicolon), the image runs with any privileges with which it was installed. Refer to the HP OpenVMS System Management Utilities Reference Manual: A--L for more information about the Install utility.

If you invoke an image locally, you must have read (R) or execute (E) access to the image. If you have DECnet software installed and want to execute an image over the network, you must have read (R) access to the image.

If you are invoking an image that requires one or more parameters, you must use the Automatic Foreign Command format or the Foreign Command format. For additional information, see the string assignment statement (:=) in the HP OpenVMS DCL Dictionary: A--M, and refer to the OpenVMS User's Manual.


Qualifier

/DEBUG

/NODEBUG

Executes the image under control of the debugger. The default is the /DEBUG qualifier if the image is linked with the /DEBUG qualifier and the /NODEBUG qualifier if the image is linked without the /DEBUG qualifier. The /DEBUG qualifier is invalid if the image is linked with the /NOTRACEBACK qualifier. The /NODEBUG qualifier overrides the effect of the LINK/DEBUG command. If the image was linked with the /TRACEBACK qualifier, traceback reporting is performed when an error occurs.

If the image was not linked with the debugger, you can specify the /DEBUG qualifier to request the debugger at execution time; however, if the /NOTRACEBACK qualifier was specified when the image was linked, the /DEBUG qualifier is invalid.

For a complete description of the OpenVMS Debugger, refer to the OpenVMS Debugger Manual.

To get help on debugger commands from the DCL level, type the following command:


$ HELP/LIBRARY=SYS$HELP:DBG$HELP DEBUG

Examples

#1

$ RUN LIBRA

      

The image LIBRA.EXE starts executing in the process. If the image LIBRA has been installed with amplified privileges, it runs with those privileges because you have not explicitly specified a version number or a semicolon. Alternatively, the image LIBRA.EXE still runs with its amplified privileges, if you enter the RUN command as follows:


$ RUN LIBRA.EXE
#2

$ MACRO/ENABLE=DEBUG ORION
$ LINK/DEBUG ORION
$ RUN ORION

     VAX DEBUG Version 5.4

%DEBUG-I-INITIAL, language is MACRO, module set to 'ORION'
DBG>
   .
   .
   .
$ RUN/NODEBUG ORION
      

A program is compiled, linked, and run with the debugger. Subsequently, a RUN/NODEBUG command requests that the debugger, which is present in the image, not issue a prompt. If an error occurs while the image executes, the debugger can perform traceback and report on the error.

#3

$ RUN AQUARIUS.EXE;1
      

The image AQUARIUS.EXE starts executing in the process. If the image AQUARIUS.EXE has been installed with amplified privileges, it does not run with those privileges because you have specified a version number. Instead, the image runs with current process privileges only. When you specify a version number (or even just a semicolon), the image activator does not search its list of special images that have been installed with privileges. The process AQUARIUS still runs with only normal process privileges if you enter the RUN command as follows:


$ RUN AQUARIUS.EXE;

In this case, however, the highest version of the image AQUARIUS runs.


RUN (Process)

Creates a subprocess or a detached process to run an image and deletes the process when the image completes execution. A subprocess is created if any of the qualifiers except the /UIC or the /DETACHED qualifier is specified. A detached process is created if the /UIC or the /DETACHED qualifier is specified and you have the IMPERSONATE user privilege.

Format

RUN filespec


Parameter

filespec

Specifies the file name of an executable image to be executed in a separate process. The default file type is .EXE. The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.

Description

The RUN command creates a process to execute the specified image. If you specify the /UIC or the /DETACHED qualifier, the RUN command creates a detached process; otherwise, the RUN command creates a subprocess.

When you specify any qualifiers with the RUN command, the RUN command creates a process and displays the process identification (PID) code in SYS$OUTPUT. The newly created process executes the image named in the file specification. When the image has finished executing, the system deletes the process that was running that image.

By default, the RUN command creates a subprocess with the same user identification code (UIC), current disk and directory defaults, privileges, and priority as the current process.

If the detached process terminates unexpectedly and you want to find out why, you can use the Accounting utility to display the final exit status of the process. For more information, see the HP OpenVMS System Management Utilities Reference Manual.

Both the /DETACHED and the /UIC qualifiers request the RUN command to create a detached process. You must have the user privilege IMPERSONATE or CMKRNL to create a detached process with a different UIC. When you create a detached process, the resource quotas are established as follows:

  • If you do not specify a value for a particular quota, that quota is given the value of the corresponding PQL_D* (default) system parameter.
  • If you specify a value for a particular quota, that value is compared with the quotas for the creator process (maximum) and the system parameters PQL_M* (minimum). If the value you specify is within the allowed range, it is used for the new process. If you specify a value greater than the creator process's quota, the creator process's quota is used. If the specified value is less than the corresponding system parameter, the system parameter value is substituted.

However, if you have the IMPERSONATE or CMKRNL privilege, you can specify any quotas for the detached process.

Input, Output, and Error Streams

Use the following qualifiers to assign equivalence names for the logical names SYS$INPUT, SYS$OUTPUT, and SYS$ERROR for the process:

/INPUT
/OUTPUT
/ERROR

The equivalence names you specify for these process-permanent files are interpreted within the context of the process you are creating. For example, file type defaults, and logical name use and translation are image- and language-dependent.

Defining Process Attributes

Use the following qualifiers to override the default attributes for a process:

/ACCOUNTING
/DUMP
/PRIORITY
/PRIVILEGES
/PROCESS_NAME
/SERVICE_FAILURE
/SWAPPING

Assigning Resource Quotas

When you enter a RUN command to create a process, you can define quotas to restrict the amount of various system resources available to the process. The following resource quota is deductible when you create a subprocess; that is, the value you specify is subtracted from your current quota and given to the subprocess:

Qualifier Quota
/TIME_LIMIT CPUTIME

The quota amount is returned to your current process when the subprocess is deleted.

The system defines minimum values for each specifiable quota. If you specify a quota that is below the minimum, or if you specify a deductible quota that reduces your current quota below the minimum, the RUN command cannot create the process. To determine your current quotas, enter the SHOW PROCESS/QUOTAS command.

You can also specify limits for nondeductible quotas. Nondeductible quotas are established and maintained separately for each process and subprocess. The following qualifiers specify nondeductible quotas:

Qualifier Quota
/AST_LIMIT ASTLM
/EXTENT WSEXTENT
/IO_BUFFERED BIOLM
/IO_DIRECT DIOLM
/MAXIMUM_WORKING_SET WSQUOTA
/WORKING_SET WSDEFAULT

A third type of quota treatment is pooling. Pooled quotas are established when a detached process is created. They are shared by that process and all its descendent subprocesses. Charges against pooled quota values are subtracted from the current available totals as they are used and are added back to the total when they are not being used. The following qualifiers specify pooled quotas:

Qualifier Quota
/BUFFER_LIMIT BYTLM
/ENQUEUE_LIMIT ENQLM
/FILE_LIMIT FILLM
/PAGE_FILE PGFLQUOTA
/QUEUE_LIMIT TQELM
/SUBPROCESS_LIMIT PRCLM

Hibernation and Scheduled Wakeup Requests

Use the following qualifiers to schedule execution of the image:

/DELAY
/INTERVAL
/SCHEDULE

If you specify any of these qualifiers, the RUN command creates the process and places it in hibernation. The process cannot execute the image until it is awakened. Time values specified with these three qualifiers control when the process is awakened to execute the specified image.

You can schedule wakeup requests for a specified delta time (/DELAY qualifier) or absolute time (/SCHEDULE qualifier). You can also schedule wakeup requests for recurrent intervals with the /INTERVAL qualifier. If you specify an interval time, the created process is awakened to execute the specified image at fixed time intervals. If the image terminates normally (for example, by a RET instruction), the process returns to a state of hibernation, awaiting the next scheduled wakeup time and user-mode exit handlers are not called. At the next wakeup time, the image is recalled at its entry point; the image is not reactivated. If the image terminates abnormally, or by an $EXIT command, or by a $FORCEX command, the process does not return to hibernation, further scheduling requests are terminated, user-mode exit handlers are called, the image exits, and the created process is deleted.

Use the /PROCESS_NAME qualifier to give the created process a name. You can use this process name in a subsequent STOP or CANCEL command. A STOP command terminates execution of the image in the process and causes the process to be deleted. The CANCEL command cancels wakeup requests that are scheduled but have not yet been delivered.


Qualifiers

/ACCOUNTING (default)

/NOACCOUNTING

Requires ACNT (accounting) privilege to use the /NOACCOUNTING qualifier.

The /NOACCOUNTING qualifier stops the current accounting file tracking the resources used by the created process.

The /ACCOUNTING qualifier (the default) has no effect.

/AST_LIMIT=quota

Specifies the maximum number of asynchronous system traps (ASTs) that the created process can have outstanding.

If you do specify an AST limit quota, the default quota established at system generation time is used. The minimum required for any process to execute is 2.

The AST limit quota is nondeductible.

/AUTHORIZE

/NOAUTHORIZE (default)

Requires IMPERSONATE privilege.

When the image to be executed is the system login image (LOGINOUT.EXE), this qualifier searches the user authorization file (UAF) to validate a detached process. The /NOAUTHORIZE qualifier creates a detached process that runs under the control of the command interpreter.

When you specify the /AUTHORIZE qualifier, quotas are derived from the user authorization file (UAF) record of the process' owner. Any qualifiers to the RUN command that specify other quotas are ignored in favor of the UAF quotas.

When you specify the /NOAUTHORIZE qualifier, quotas are derived from the system parameters that set process quota default limits (parameters prefixed with PQL_D).

Specify the /AUTHORIZE qualifier if you want the login image to check the UAF whenever a detached process is created. The process-permanent files specified by the /INPUT and /OUTPUT qualifiers are made available to the command interpreter for input and output.

/BUFFER_LIMIT=quota

Specifies the maximum amount of memory, in bytes, that the process can use for buffered I/O operations or for temporary mailbox creation.

If you do not specify a buffered I/O quota, the default value established at system generation time is used. The minimum amount required for any process to execute is 1024 bytes.

The buffer limit quota is pooled.

/DELAY=delta-time

Places the created process in hibernation and awakens it after a specified time interval.

Specify the delta time according to the rules for entering delta times given in the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time).

If you specify both the /DELAY and /INTERVAL qualifiers, the first wakeup request occurs at the time specified by the /DELAY qualifier. All subsequent wakeup requests occur at the interval specified by the /INTERVAL qualifier.

/DETACHED

/NODETACHED

Creates a detached process with the same user identification code (UIC) as the current process. (To create a detached process with a different UIC, use the /UIC qualifier.) By default, the created process is not a detached process.

By default, resource quotas for the detached process are limited by the quotas of the creator process (maximum) and the system parameters PQL_M* (minimum). The IMPERSONATE or CMKRNL privilege allows you to specify any quotas for the detached process that exceed the normal range. Unless you have the IMPERSONATE or CMKRNL privilege, the maximum number of detached processes that you can create is limited to the quota defined by MAX_DETACH in your UAF.

/DUMP

/NODUMP (default)

When an image terminates because of an unhandled error, the /DUMP qualifier causes the contents of the address space to be written to the file named image-name.DMP in the process's default device and directory. You can then use the Analyze/Process_Dump utility to analyze the dump.

/ENQUEUE_LIMIT=quota

Specifies the maximum number of locks that a process can have outstanding at any one time.


Previous Next Contents Index