This verb specifies how the NOF application interacts with
the target node, configuration file, or SNA network data file: whether
the application has read-only access or read/write access, and whether
the application has exclusive access to the domain configuration
file so that other applications cannot access it.
The target node or file is specified by the target_handle parameter on the NOF API call; the application obtains
this parameter from the verb CONNECT_NODE (for a node) or OPEN_FILE
(for a file). For more information about the use of this parameter,
see “Description
of the NOF API Entry Points”.
This verb may be issued to the domain configuration file,
to the sna.net file, or to a running node. The valid processing modes
that can be set with this verb depend on the target type.
VCB
Structure |
 |
typedef struct set_processing_mode { AP_UINT16 opcode; /* verb operation code */ unsigned char reserv2; /* reserved */ unsigned char format; /* reserved */ AP_UINT16 primary_rc; /* primary return code */ AP_UINT32 secondary_rc; /* secondary return code */ AP_UINT32 mode; /* new mode to be set for this handle */ } SET_PROCESSING_MODE;
|
Supplied
Parameters |
 |
- opcode
AP_SET_PROCESSING_MODE
- mode
Requested mode for this target handle. The mode cannot
be changed while any previous verbs issued using this target handle
are still outstanding. Possible values are:
- AP_MODE_READ_ONLY
Read-only mode: the application will use only QUERY_*
verbs, which do not modify the configuration. This option can be
used with either a file or a node as the target.
- AP_MODE_READ_WRITE
Read / write mode: the application may use any NOF
API verbs. This option can be used with either a file or a node
as the target.
- AP_MODE_COMMIT
Commit mode: the application has exclusive read/write
access to the target file, so that other applications cannot access
it until this application releases it. This option can be used only
with the domain configuration file as the target.
This mode is intended for issuing a series of connected verbs
to a file (such as a series of DEFINE verbs for related components).
The application should complete the series of verbs as quickly as
possible and then reset its processing mode to one of the other options,
in order to release the file so that other NOF API applications
or SNAplus2 components can access it.
Returned
Parameters: Successful Execution |
 |
If the verb executes successfully, SNAplus2 returns the following parameters:
- primary_rc
AP_OK
- secondary_rc
Not used.
Returned
Parameters: Parameter Check |
 |
If the verb does not execute because of a parameter error,
SNAplus2 returns the following parameters:
- primary_rc
AP_PARAMETER_CHECK
- secondary_rc
Possible values are:
- AP_INVALID_PROC_MODE
The mode parameter was not set to a valid value.
- AP_INVALID_TARGET_MODE
The mode parameter was not valid for the selected target.
Appendix A “Common
Return Codes” lists further
secondary return codes associated with AP_PARAMETER_CHECK,
which are common to all NOF verbs.
Returned
Parameters: State Check |
 |
If the verb does not execute because of a state check, SNAplus2
returns the following parameters.
- primary_rc
AP_STATE_CHECK
- secondary_rc
Possible values are:
- AP_FILE_UNAVAILABLE
The application specified commit mode, but was unable
to get exclusive access to the required configuration file. This
may be because another application is accessing the file in commit
mode.
- AP_VERB_IN_PROGRESS
The processing mode for the specified target handle
cannot be changed because a previous verb issued for this handle
is still outstanding. All verbs for the target handle must be completed
before attempting to change the processing mode.
- AP_NOT_MASTER
The processing mode cannot be changed to AP_MODE_READ_WRITE or AP_MODE_COMMIT because
the target handle specifies a file (either the domain configuration
file or the SNA network data file) on a backup server that is no
longer acting as the master server. Changes to the running configuration
file can be made only to the copy of this file on the master (so that
they will be distributed to other servers); other copies of the
file can be accessed only in read-only mode. If the application
needs to use read/write or commit mode, it should issue CLOSE_FILE
for this target handle, and then reissue OPEN_FILE to access the
file on the new master server.
Appendix A “Common
Return Codes” lists further
secondary return codes associated with AP_STATE_CHECK,
which are common to all NOF verbs.
Returned
Parameters: Other Conditions |
 |
Appendix A “Common
Return Codes” lists further
combinations of primary and secondary return codes that are common
to all NOF verbs.