To specify the following function codes, no privilege is required:
To specify a scheduling priority (using the SJC$_PRIORITY item code) higher than the value of the SYSGEN parameter MAXQUEPRI, the caller needs OPER or ALTPRI privilege.
To specify the following item codes, the caller must have OPER privilege:
To specify the following item codes, the caller must have CMKRNL privilege:
Required Quota
To specify the astadr argument, the process must have sufficient ASTLM quota.
Related Services
$ALLOC, $ASSIGN, $BRKTHRU, $BRKTHRUW, $CANCEL, $CREMBX, $DALLOC, $DASSGN, $DELMBX, $DEVICE_SCAN, $DISMOU, $GETDVI, $GETDVIW, $GETMSG, $GETQUI, $GETQUIW, $INIT_VOL, $MOUNT, $PUTMSG, $QIO, $QIOW, $SNDERR, $SNDJBCW, $SNDOPR, $TRNLNM
SS$_NORMAL The service completed successfully. SS$_ACCVIO The item list or input buffer cannot be read by the caller; or the return length buffer, output buffer, or status block cannot be written by the caller. SS$_BADPARAM The function code is invalid; the item descriptor contains an invalid buffer length value; a buffer descriptor has an invalid length; or the reserved parameter has a nonzero value. SS$_DEVOFFLINE The job controller process is not running. SS$_EXASTLM You specified the astadr argument, and the process has exceeded its ASTLM quota. SS$_ILLEFC The efn argument specifies an illegal event flag number. SS$_INSFMEM Insufficient space exists for completing the request. SS$_IVLOGNAM Queue form or characteristic name is not a valid logical name. SS$_MBFULL The job controller mailbox is full. SS$_MBTOOSML The mailbox message is too large for the job controller mailbox. SS$_SHELVED The job controller attempted to access a shelved file. The service does not automatically unshelve files. SS$_UNASEFC The efn argument specifies an unassociated event flag cluster.
JBC$_NORMAL The service completed successfully. JBC$_AUTONOTSTART The queue is autostart active, but not started. You have tried to start an autostart queue when none of its available nodes has autostart enabled. JBC$_BUFTOOSMALL The request could not be completely satisfied due to limited buffer size. The amount of information retrieved in response to the query exceeds the amount of data the queue manager can return in response to a single request. JBC$_DELACCESS The file protection of the specified file, which was entered with the delete option, does not allow delete access to the caller. JBC$_DUPCHARNAME The command specified a duplicate characteristic name. Each characteristic must have a unique name. JBC$_DUPCHARNUM The command specified a duplicate characteristic number. Each characteristic must have a unique number. JBC$_DUPFORM The specified form number is invalid because it is already defined; each form must have a unique form number. JBC$_DUPFORMNAME The command specified a duplicate form name. Each form must have a unique name. JBC$_EMPTYJOB The open job cannot be closed because it contains no files. JBC$_EXECUTING The parameters of the specified job cannot be modified because the job is currently executing. JBC$_INCDSTQUE The type of the specified destination queue is inconsistent with the requested operation. JBC$_INCFORMPAR The specified length, width, and margin parameters are inconsistent; the value of the difference between the top and bottom margin parameters must be less than the form length, and the difference between the left and right margin parameters must be less than the line width. JBC$_INCOMPLETE The requested queue management operation cannot be executed because a previously requested queue management operation has not yet completed. JBC$_INCQUETYP The type of the specified queue is inconsistent with the requested operation. JBC$_INTERNALERROR An internal error caused loss of process status. A system error prevented the queue manager from obtaining the completion status of a process. JBC$_INVCHANAM A specified characteristic name is not syntactically valid. JBC$_INVDSTQUE The destination queue name is not syntactically valid. JBC$_INVFORNAM The form name is not syntactically valid. JBC$_INVFUNCOD The specified function code is invalid. JBC$_INVITMCOD The item list contains an invalid item code. JBC$_INVPARLEN The length of a specified string is outside the valid range for that item code. JBC$_INVPARVAL A parameter value specified for an item code is outside the valid range for that item code. JBC$_INVQUENAM The queue name is not syntactically valid. JBC$_ITMREMOVED The meaningless items were removed from the request. One or more item codes not meaningful to this command were specified. The command is processed and the meaningless items are ignored. JBC$_JOBNOTEXEC The specified job is not executing. JBC$_JOBQUEDIS The request cannot be executed because the system job queue manager has not been started. JBC$_JOBQUEENA The system job queue manager cannot be started because it is already running. JBC$_MISREQPAR An item code that is required for the specified function code has not been specified. JBC$_NOAUTOSTART The node does not have the autostart feature enabled. JBC$_NODSTQUE The specified destination queue does not exist. JBC$_NOOPENJOB The requesting process did not open a job with the SJC$_CREATE_JOB function. JBC$_NOPRIV The queue protection denies access to the queue for the specified operation. JBC$_NOQUESPACE The system job queue file was full and could not be extended. JBC$_NORESTART The specified job cannot be requeued because it was not defined as restartable. JBC$_NOSUCHCHAR The specified characteristic does not exist. JBC$_NOSUCHENT There is no job with the specified entry number. JBC$_NOSUCHFORM The specified form does not exist. JBC$_NOSUCHJOB The specified job does not exist. JBC$_NOSUCHMGR The specified queue manager does not exist. JBC$_NOSUCHNODE The specified node does not exist. JBC$_NOSUCHQUE The specified queue does not exist. JBC$_NOTALLREQUE Not all jobs in the source queue could be requeued to the target queue. Some of the jobs specified were not suitable for execution on the specified target queue. JBC$_NOTASSIGN The specified queue cannot be deassigned because it is not assigned. JBC$_NOTMEANINGFUL The specified item code is no longer meaningful. JBC$_NOTSUPPORTED The specified item code or function code is not supported. JBC$_PRIOSMALL The scheduling priority has a smaller value than requested. A user without ALTPRI or OPER privilege specified a value for a job's priority that exceeded the queue's maximum priority for nonprivileged jobs. The job is entered in the queue, but its scheduling priority is lower than the value requested by the user. JBC$_QMANNOTSTARTED The queue manager could not be started. JBC$_QUEDISABLED The disabled queue cannot be modified, nor can jobs be submitted to it. JBC$_QUENOTMOD The modifications were not made because the queue was not stopped. JBC$_QUENOTSTOP The specified queue cannot be deleted because it is not in a stopped state. JBC$_REFERENCED The specified queue cannot be deleted because of existing references by other queues or jobs. JBC$_STARTED The specified queue cannot be started because it is already running. JBC$_STKNOTCHANGE The stock associated with a form cannot be changed. JBC$_TOOMUCHINFO The size of the data in request exceeds system constraints. The amount of data specified for a record within the queue manager's database is too large.
When you use the SJC$_SYNCHRONIZE_JOB function code, the return value is the exit status of the specified job.
When you start a symbiont queue with the SJC$_START_QUEUE function code or the SJC$_CREATE_QUEUE function code with the SJC$_CREATE_START item code, any error encountered by the symbiont process will be returned in the IOSB.
! Declare system service related symbols INTEGER*4 SYS$SNDJBCW, 2 STATUS INCLUDE '($SJCDEF)' ! Define item list structure STRUCTURE /ITMLST/ UNION MAP INTEGER*2 BUFLEN, ITMCOD INTEGER*4 BUFADR, RETADR END MAP MAP INTEGER*4 END_LIST END MAP END UNION END STRUCTURE ! Define I/O status block structure STRUCTURE /IOSBLK/ INTEGER*4 STS, ZEROED END STRUCTURE ! Declare $SNDJBCW item list and I/O status block RECORD /ITMLST/ SUBMIT_LIST(6) RECORD /IOSBLK/ IOSB ! Declare variables used in $SNDJBCW item list CHARACTER*9 QUEUE /'SYS$BATCH'/ CHARACTER*23 FILE_SPECIFICATION /'$DISK1:[COMMON]TEST.COM'/ CHARACTER*12 USERNAME /'PROJ3036 '/ INTEGER*4 ENTRY_NUMBER ! Initialize item list for the enter file operation SUBMIT_LIST(1).BUFLEN = 9 SUBMIT_LIST(1).ITMCOD = SJC$_QUEUE SUBMIT_LIST(1).BUFADR = %LOC(QUEUE) SUBMIT_LIST(1).RETADR = 0 SUBMIT_LIST(2).BUFLEN = 23 SUBMIT_LIST(2).ITMCOD = SJC$_FILE_SPECIFICATION SUBMIT_LIST(2).BUFADR = %LOC(FILE_SPECIFICATION) SUBMIT_LIST(2).RETADR = 0 SUBMIT_LIST(3).BUFLEN = 12 SUBMIT_LIST(3).ITMCOD = SJC$_USERNAME SUBMIT_LIST(3).BUFADR = %LOC(USERNAME) SUBMIT_LIST(3).RETADR = 0 SUBMIT_LIST(4).BUFLEN = 0 SUBMIT_LIST(4).ITMCOD = SJC$_NO_LOG_SPECIFICATION SUBMIT_LIST(4).BUFADR = 0 SUBMIT_LIST(4).RETADR = 0 SUBMIT_LIST(5).BUFLEN = 4 SUBMIT_LIST(5).ITMCOD = SJC$_ENTRY_NUMBER_OUTPUT SUBMIT_LIST(5).BUFADR = %LOC(ENTRY_NUMBER) SUBMIT_LIST(5).RETADR = 0 SUBMIT_LIST(6).END_LIST = 0 ! Call $SNDJBCW service to submit the batch job STATUS = SYS$SNDJBCW (, 2 %VAL(SJC$_ENTER_FILE),, 2 SUBMIT_LIST, 2 IOSB,,) IF (STATUS) STATUS = IOSB.STS IF (.NOT. STATUS) CALL LIB$SIGNAL (%VAL(STATUS)) END
This Fortran program demonstrates the use of the$SNDJBCW service to submit a batch job that is to execute on behalf of another user. No log file is produced for the batch job. This program saves the job's entry number. You need CMKRNL privilege to run this program.
The Send to Job Controller and Wait and $GETQUI services together provide the user interface to the Job Controller (JBC) facility. The $SNDJBW service allows you to create, stop, and manage queues and the jobs in those queues. Queues can be generic, batch, execution, or output queues. Jobs can be batch or print jobs.The $SNDJBCW service queues a request to the job controller. For most operations, $SNDJBCW completes synchronously; that is, it returns to the caller after the operation completes. However, if the requested operation is a pause queue, stop queue, or abort job operation, $SNDJBCW returns to the caller after queuing the request. There is no way to synchronize completion of these operations. Also, $SNDJBCW does not wait for a job to complete before it returns to the caller. To synchronize completion of a job, the caller must specify the SJC$_SYNCHRONIZE_JOB function code.
The $SNDJBCW service is identical to the Send to Job Controller ($SNDJBC) service except that $SNDJBC completes asynchronously; the $SNDJBC service returns to the caller immediately after queuing the request, without waiting for the operation to complete.
For additional information about $SNDJBCW, refer to the documentation of $SNDJBC.
The $SNDJBC and $SNDJBCW services supersede the Send Message to Symbiont Manager ($SNDSMB) and Send Message to Accounting Manager ($SNDACC) services. You should write new programs using $SNDJBC or $SNDJBCW, instead of $SNDSMB or $SNDACC. You should convert old programs using $SNDSMB or $SNDACC to use $SNDJBC or $SNDJBCW, as convenient.
SYS$SNDJBCW [efn] ,func [,nullarg] [,itmlst] [,iosb] [,astadr] [,astprm]
int sys$sndjbcw (unsigned int efn, unsigned short int func, unsigned int nullarg, void *itmlst, struct _iosb *iosb, void (*astadr)(__unknown_params), int astprm);
Performs the following functions:
- Sends a user request to operator terminals
- Sends a user cancellation request to operator terminals
- Sends an operator reply to a user terminal
- Enables an operator terminal
- Displays the status of an operator terminal
- Initializes the operator log file
SYS$SNDOPR msgbuf ,[chan]
int sys$sndopr (void *msgbuf, unsigned short int chan);
msgbuf
OpenVMS usage: char_string type: character-coded text string access: read only mechanism: by descriptor--fixed-length string descriptor
User buffer specifying the operation to be performed and the information needed to perform that operation. The msgbuf argument is the address of a character string descriptor pointing to the buffer.The format and contents of the buffer vary with the requested operation; however, the first byte in any buffer is the request code, which specifies the operation to be performed. The $OPCMSG macro defines the symbolic names for these request codes. The following table shows each operation that $SNDOPR performs and the request code that specifies that operation.
Request Code Corresponding Operation OPC$_RQ_CANCEL Sends a user cancellation request to specified operator terminals. You use this request code to notify one or more operators that a previous request is to be canceled. To specify OPC$_RQ_CANCEL, you must also specify the chan argument. OPC$_RQ_LOGI Initializes the operator log file. OPC$_RQ_REPLY Sends an operator reply to a user who has made a request. Operators use this request code to report the status of a user request. The format of the message buffer for this request is the format of the reply found in the user's mailbox after the call to $SNDOPR completes. All functions of $SNDOPR that deliver a reply to a mailbox do so in the format described for this request code. OPC$_RQ_RQST Sends a user request to operator terminals. This request code is used to make an operator request. If you specify a reply to the request (by using the chan argument), the operator request is kept active until the operator responds. OPC$_RQ_STATUS Reports the status of an operator terminal. Operators use this request to display the operator classes for which the specified terminal is enabled and a list of outstanding requests. OPC$_RQ_TERME Enables an operator terminal. You use this request to enable a specified terminal to receive operator messages. The following diagrams depict the message buffer for each of these request codes. Each field within a diagram has a symbolic name, which serves to identify the field; in other words, these names specify offsets into the message buffer. The list following each diagram shows each field name and what its contents can or should be. The $OPCDEF macro defines the field names, as well as any other symbolic name that can be specified as the contents of a field.
Message Buffer Format for OPC$_RQ_RQST
![]()
OPC$B_MS_TYPE This 1-byte field contains the request code OPC$_RQ_RQST. OPC$B_MS_TARGET This 3-byte field contains a 24-bit bit vector that specifies which operator terminal types are to receive the request. The $OPCDEF macro defines symbolic names for the operator terminal types. You construct the bit vector by specifying the desired symbolic names in a logical OR operation. Following is the symbolic name of each operator terminal type:
OPC$M_NM_CARDS Card device operator OPC$M_NM_CENTRL Central operator OPC$M_NM_CLUSTER OpenVMS Cluster operator OPC$M_NM_DEVICE Device status information OPC$M_NM_DISKS Disk operator OPC$M_NM_NTWORK Network operator OPC$M_NM_TAPES Tape operator OPC$M_NM_PRINT Printer operator OPC$M_NM_SECURITY Security operator OPC$M_NM_OPER1
through
OPC$M_NM_OPER12System-manager-defined operator functions OPC$L_MS_RQSTID This longword field contains a user-supplied longword message code. OPC$L_MS_TEXT This variable-length field contains an ASCII string specifying text to be sent to the specified operator terminals. $SNDOPR uses the buffer size of the device to which the message is being sent. Message Buffer Format for OPC$_RQ_CANCEL
![]()
OPC$B_MS_TYPE This 1-byte field contains the request code OPC$_RQ_CANCEL. OPC$B_MS_TARGET This 3-byte field contains a 24-bit bit vector that specifies which operator terminal types are to receive the cancellation request. The $OPCDEF macro defines symbolic names for the operator terminal types. You construct the bit vector by specifying the desired symbolic names in a logical OR operation. Following is the symbolic name of each operator terminal type:
OPC$M_NM_CARDS Card device operator OPC$M_NM_CENTRL Central operator OPC$M_NM_SECURITY Security operator OPC$M_NM_CLUSTER OpenVMS Cluster operator OPC$M_NM_DEVICE Device status information OPC$M_NM_DISKS Disk operator OPC$M_NM_NTWORK Network operator OPC$M_NM_TAPES Tape operator OPC$M_NM_PRINT Printer operator OPC$M_NM_OPER1
through
OPC$M_NM_OPER12System-manager-defined operator functions OPC$L_MS_RQSTID This longword field contains a user-supplied longword message code. Message Buffer Format for OPC$_RQ_REPLY
![]()
OPC$B_MS_TYPE This 1-byte field contains the request code OPC$_RQ_REPLY. Reserved This 1-byte field is reserved for future use. OPC$W_MS_STATUS This 2-byte field contains the low-order word of the longword condition value that $SNDOPR returns in the mailbox specified by the chan argument. You can find a list of these longword condition values under Condition Values Returned in the Mailbox. To test the completion status, you need to extract the low-order word from the longword condition value and compare it to the contents of the OPC$W_MS_STATUS field. OPC$L_MS_RPLYID This 4-byte field contains a user-supplied message code. OPC$W_MS_OUNIT This 2-byte field contains the unit number of the terminal to which the operator reply is to be sent. To obtain the unit number of the terminal, you can call $GETDVI, specifying the DVI$_FULLDEVNAM item code. The information returned will consist of the node name and device name as a padded string. Because the unit number is found on the tail end of the string, you must parse the string. One way to do this is, starting from the tail end, to search for the first alphabetic character; the digits to the right of this alphabetic character constitute the unit number. After extracting the unit number, count the remaining characters in the string. Then, construct a counted ASCII string and use this for the following field, OPC$T_MS_ONAME.
OPC$T_MS_ONAME This variable-length field contains a counted ASCII string specifying the device name of the terminal that is to receive the operator reply. The maximum total length of the string is 14 bytes. See the preceding field description (OPC$W_MS_OUNIT) to learn how to obtain the device name. OPC$L_MS_OTEXT This variable-length field contains an ASCII string specifying operator-written text to be sent to the user terminal. The length of the string must be in the range 0 to 255 bytes. This field is optional. Message Buffer Format for OPC$_RQ_TERME
![]()
OPC$B_MS_TYPE This 1-byte field contains the request code OPC$_RQ_TERME. OPC$B_MS_ENAB This 3-byte field contains a user-supplied value. The value 0 indicates that the specified terminal is to be disabled for the specified operator classes. Any nonzero value indicates that the specified terminal is to be enabled for the specified operator classes. OPC$B_MS_MASK This 4-byte field contains a 4-byte bit vector that specifies which operator terminal types are to be enabled or disabled for the specified terminal. The $OPCDEF macro defines symbolic names for the operator terminal types. You construct the bit vector by specifying the desired symbolic names in a logical OR operation. Following is the symbolic name of each operator terminal type:
OPC$M_NM_CARDS Card device operator OPC$M_NM_CENTRL Central operator OPC$M_NM_SECURITY Security operator OPC$M_NM_CLUSTER OpenVMS Cluster operator OPC$M_NM_DEVICE Device status information OPC$M_NM_DISKS Disk operator OPC$M_NM_NTWORK Network operator OPC$M_NM_TAPES Tape operator OPC$M_NM_PRINT Printer operator OPC$M_NM_OPER1
through
OPC$M_NM_OPER12System-manager-defined operator functions OPC$W_MS_OUNIT This 2-byte field contains the unit number of the operator terminal to be enabled or disabled for the specified operator terminal types. To obtain the unit number of the terminal, you can call $GETDVI, specifying the DVI$_FULLDEVNAM item code. The information returned will consist of the node name and device name as a padded string. Because the unit number is found on the tail end of the string, you must parse the string. One way to do this is, starting from the tail end, to search for the first alphabetic character; the digits to the right of this alphabetic character constitute the unit number. After extracting the unit number, count the remaining characters in the string. Then, construct a counted ASCII string and use this for the following field, OPC$T_MS_ONAME.
OPC$T_MS_ONAME This variable-length field contains a counted ASCII string specifying the device name of the operator terminal to be enabled or disabled for the specified operator terminal types. The maximum total length of the string is 16 bytes. See the preceding field description (OPC$W_MS_OUNIT) to learn how to obtain the device name.
Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]
![]()
4527P076.HTM OSSG Documentation 22-NOV-1996 13:00:46.32Copyright © Digital Equipment Corporation 1996. All Rights Reserved.