Compaq ACMS for OpenVMS
Remote Systems Management Guide


Previous Contents Index

This call executes synchronously. It does not return to the caller until the attempt to start the system is complete. Any messages associated with an unsuccessful start of the system are returned in the cmd_output linked list.

The data and data_warn structures contain identical data. If the operation fails, the status field of both structures will be MGMT_WARN; in this case, use the data_warn structure to fetch the status messages from the cmd_output linked list.

If the operation is successful, the status field of both structures will be MGMT_SUCCESS. There are no status messages associated with a successful call. If the status field contains MGMT_FAIL, the call failed. No status messages are returned; instead, the reason for the failure is contained in the rc field.


Example


int start_acc(int client_id,CLIENT *cl) 
{ 
   dcl_link    *nl; 
 
   static acc_startup_rec start_struct; 
 
   static cmd_output_rec *ret_struct; 
 
   start_struct.client_id = client_id; 
 
   start_struct.audit_sw  = 1; 
   start_struct.qti_sw  = 1; 
   start_struct.terminals_sw  = 1; 
 
   ret_struct = acmsmgmt_start_acc_1(&start_struct,cl); 
 
   if (!ret_struct) { 
      printf("\n Call to start system failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (ret_struct->status != MGMT_SUCCESS) { 
 
      if (ret_struct->status != MGMT_WARN) { 
         printf("\nCall to start ACMS system failed with status 
%d",ret_struct->status); 
         return(MGMT_FAIL); 
       } 
 
        printf("\n Call to start ACMS system completed with warnings or 
errors"); 
 
       for (nl = ret_struct->cmd_output_rec_u.data.cmd_output; nl != NULL; nl = 
nl->pNext) 
            printf("\n %s",nl->dcl_msg); 
 
        return(MGMT_FAIL); 
   } 
   else { 
        printf("\nCall to start ACMS system was executed"); 
        for (nl = ret_struct->cmd_output_rec_u.data.cmd_output; nl != NULL; nl 
= nl->pNext) 
            printf("\n %s",nl->dcl_msg); 
   } 
 
 return(0); 
} 
      

In the preceding example, the acmsmgmt_start_acc_1 procedure is called to start the ACMS run-time system on the target node. The system is started with system auditing enabled, the QTI started, and terminals started. If the call succeeds, the ACMS run-time system is started on the target node. Otherwise, any error messages associated with the failure are displayed. The example in Section 5.3.1 shows how to declare and initialize the input arguments to this procedure.

7.34 ACMSMGMT_START_EXC_1

This procedure requests that the Remote Manager start an ACMS application on the same node on which the Remote Manager is running.

Format

cmd_output_rec *acmsmgmt_start_exc_1(exc_startup_rec *exc_start_rec,CLIENT *cl)


Parameters

exc_start_rec

Type: Exc_startup_rec
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client identification and Trap table fields.
     
  client_id
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: If explicit authentication is being used, a valid client ID must be provided. If the value for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.
     
  appl_name
  Type: Null-terminated string
  Access: Read
  Mechanism: By reference
  Usage: Pointer to the application name of the application to be started.

cl

Type: CLIENT *
Access: Read  
Mechanism: By value  
Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.

Return Value

Type: Cmd_output_rec
Access: Write
Mechanism: By reference
Usage: Pointer to a union. The union contains either a failure code or a structure of type cmd_rec_r, which points to a linked list containing status messages. The following are the contents of this union:
         
  status
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  rc
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  data, data_warn
  Type: Cmd_rec
  Access: Write
  Mechanism: By value
  Usage: Structure containing the first node in a linked list of status messages (type dcl_list). The following are the contents of this structure:
         
    cmd_output
    Type: Dcl_list
    Access: Write
    Mechanism: By reference
    Usage: Pointer to a linked list of records containing status messages related to the failure of any updates. This structure contains the following fields:
         
      dcl_msg
      Type: Null-terminated string
      Access: Write
      Mechanism: By reference
      Usage: The status message.
         
      pNext
      Type: Dcl_list
      Access: Write
      Mechanism: By reference
      Usage: Pointer to the next node in the linked list.

Description

This procedure starts an ACMS application on the same node on which the Remote Manager is running. The appl_name field in the input record determines which application will be started.

This call executes synchronously. It does not return to the caller until the attempt to start the application is complete. Any messages associated with an unsuccessful start of the application are returned in the cmd_output linked list.

The data and data_warn structures contain identical data. If the operation fails, the status field of either structure will be MGMT_WARN; in this case, use the data_warn structure to fetch the status messages from the cmd_output linked list.

If the operation is successful, the status field of either structure will be MGMT_SUCCESS. No status messages are associated with a successful call.

If the status field contains MGMT_FAIL, the call failed. No status messages are returned; instead, the reason for the failure is contained in the rc field.


Example


int start_exc(int client_id,CLIENT *cl) 
{ 
   dcl_link    *nl; 
   static char c_appl_name[] = "VR_APPL"; 
   static exc_startup_rec start_struct; 
 
   static cmd_output_rec *ret_struct; 
 
   start_struct.client_id = client_id; 
   start_struct.appl_name = c_appl_name; 
 
   ret_struct = acmsmgmt_start_exc_1(&start_struct,cl); 
 
   if (!ret_struct) { 
      printf("\n Call to start EXC failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (ret_struct->status != MGMT_SUCCESS) { 
 
      if (ret_struct->status != MGMT_WARN) { 
         printf("\nCall to start ACMS EXC failed with status 
%d",ret_struct->status); 
         return(MGMT_FAIL); 
       } 
 
        printf("\n Call to start ACMS EXC completed with warnings or errors"); 
 
       for (nl = ret_struct->cmd_output_rec_u.data.cmd_output; nl != NULL; nl = 
nl->pNext) 
            printf("\n %s",nl->dcl_msg); 
 
        return(MGMT_FAIL); 
   } 
   else { 
        printf("\nCall to start ACMS EXC was executed"); 
        for (nl = ret_struct->cmd_output_rec_u.data.cmd_output; nl != NULL; nl 
= nl->pNext) 
            printf("\n %s",nl->dcl_msg); 
   } 
 
 return(0); 
} 
      

In the preceding example, the acmsmgmt_start_exc_1 procedure is called to start an application named VR_APPL on the target node. If the call succeeds, the VR_APPL application is started on the target node. Otherwise, any error messages associated with the failure are displayed. The example in Section 5.3.1 shows how to declare and initialize the input arguments to this procedure.

7.35 ACMSMGMT_START_QTI_1

This procedure requests that the Remote Manager start a Queued Task Initiator (QTI) on the same node on which the Remote Manager is running.

Format

cmd_output_rec *acmsmgmt_start_qti_1(sub_id_struct *sub_id_rec,CLIENT *cl)


Parameters

sub_id_rec

Type: Sub_id_struct *
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client authorization information.
     
  client_id
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: If explicit authentication is being used, a valid client ID must be provided. If the value for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.

cl

Type: CLIENT *
Access: Read  
Mechanism: By value  
Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.

Return Value

Type: Cmd_output_rec
Access: Write
Mechanism: By reference
Usage: Pointer to a union. The union contains either a failure code or a structure of type cmd_rec_r, which points to a linked list containing status messages. The following are the contents of this union:
         
  status
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  rc
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  data, data_warn
  Type: Cmd_rec
  Access: Write
  Mechanism: By value
  Usage: Structure containing the first node in a linked list of status messages (type dcl_list). The following are the contents of this structure:
         
    cmd_output
    Type: Dcl_list
    Access: Write
    Mechanism: By reference
    Usage: Pointer to a linked list of records containing status messages related to the failure of any updates. This structure contains the following fields:
         
      dcl_msg
      Type: Null-terminated string
      Access: Write
      Mechanism: By reference
      Usage: The status message.
         
      pNext
      Type: Dcl_list
      Access: Write
      Mechanism: By reference
      Usage: Pointer to the next node in the linked list.

Description

This procedure starts an ACMS QTI on the same node on which the Remote Manager is running.

This call executes synchronously. It does not return to the caller until the attempt to start the QTI is complete. Any messages associated with an unsuccessful start of the QTI are returned in the cmd_output linked list.

The data and data_warn structures contain identical data. If the operation fails, the status field of both structures will be MGMT_WARN; in this case, use the data_warn structure to fetch the status messages from the cmd_output linked list.

If the operation is successful, the status field of both structures will be MGMT_SUCCESS. No status messages are associated with a successful call.

If the status field contains MGMT_FAIL, the call failed. No status messages are returned; instead, the reason for the failure is contained in the rc field.


Example


int start_qti(int client_id,CLIENT *cl) 
{ 
   dcl_link    *nl; 
   static struct sub_id_struct sub_rec; 
   static cmd_output_rec *ret_struct; 
 
   sub_rec.client_id = client_id; 
 
   ret_struct = acmsmgmt_start_qti_1(&sub_rec,cl); 
 
   if (!ret_struct) { 
      printf("\n Call to start QTI failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (ret_struct->status != MGMT_SUCCESS) { 
 
      if (ret_struct->status != MGMT_WARN) { 
         printf("\nCall to start ACMS QTI failed with status 
%d",ret_struct->status); 
         return(MGMT_FAIL); 
       } 
 
        printf("\n Call to start ACMS QTI completed with warnings or errors"); 
 
       for (nl = ret_struct->cmd_output_rec_u.data.cmd_output; nl != NULL; nl = 
nl->pNext) 
            printf("\n %s",nl->dcl_msg); 
 
        return(MGMT_FAIL); 
   } 
   else { 
        printf("\nCall to start ACMS QTI was executed"); 
        for (nl = ret_struct->cmd_output_rec_u.data.cmd_output; nl != NULL; nl 
= nl->pNext) 
            printf("\n %s",nl->dcl_msg); 
   } 
 
 return(0); 
} 
      

In the preceding example, the acmsmgmt_start_qti_1 procedure is called to start the Queued Task Initiator (QTI) on the target node. If the call succeeds, the QTI is started on the target node. Otherwise, any error messages associated with the failure are displayed. The example in Section 5.3.1 shows how to declare and initialize the input arguments to this procedure.


Previous Next Contents Index