Purpose
Set Config Option is a set
of subcommand calls (that are configuration operations) that set the
current value for a particular configuration setting. Each one sets
the configuration setting from input specified as a character string.
The
following Format and Example use the CFGOP_ADM_THREADS subcommand.
The other set subcommands (see Table 1) operate
similarly. That is, each sets the configuration setting from the character
string in the co_string field.
Format
syscall_parmlist
opcode 150 CFGOP_ADM_THREADS
parms[0] offset to CFG_OPTION
parms[1] offset to system name (optional)
parms[2] 0
parms[3] 0
parms[4] 0
parms[5] 0
parms[6] 0
CFG_OPTION
co_eye char[4] "CFOP"
co_len short sizeof(CFG_OPTION)
co_ver char 1
co_string char[81] "15" /* New value for adm_threads */
co_value_reserved int 0
co_reserved char[24] 0
systemname char[9]
Return_value 0 if request is successful, -1 if it is not successful
Return_code
EBUSY Aggregate could not be quiesced
EINTR ZFS is shutting down
EMVSERR Internal error using an osi service
ENOENT Aggregate is not attached
EPERM Permission denied to perform request
Reason_code
0xEFnnxxxx See z/OS Distributed File Service Messages and Codes
Usage notes
- Reserved fields and undefined flags must be set to binary zeros.
Privilege required
The issuer must be logged
in as root or must have READ authority to the SUPERUSER.FILESYS.PFSCTL
resource in the z/OS® UNIXPRIV
class.
Examples
#pragma linkage(BPX1PCT, OS)
extern void BPX1PCT(char *, int, int, char *, int *, int *, int *);
#include <stdio.h>
#define ZFSCALL_CONFIG 0x40000006
#define CFGOP_ADM_THREADS 150 /* Set number of admin threads */
typedef struct syscall_parmlist_t {
int opcode; /* Operation code to perform */
int parms[7]; /* Specific to type of operation, */
/* provides access to the parms */
/* parms[4]-parms[6] are currently unused*/
} syscall_parmlist;
typedef struct config_option_t {
char co_eye[4]; /* Eye catcher */
#define CFGO_EYE "CFOP"
short co_len; /* Length of structure */
char co_ver; /* Version of structure */
#define CO_VER_INITIAL 1 /* Initial version */
#define CO_SLEN 80 /* Sizeof string */
char co_string[CO_SLEN+1]; /* String value for option must be 0 terminated */
int co_value[4]; /* Place for integer values */
char co_reserved[24]; /* Reserved for future use */
} CFG_OPTION;
struct parmstruct {
syscall_parmlist myparms;
CFG_OPTION co;
char system[9];
} myparmstruct;
char new_adm_threads[CO_SLEN+1]="20"; /* New adm_threads value */
int main(int argc, char **argv)
{
int bpxrv;
int bpxrc;
int bpxrs;
CFG_OPTION *coptr = &(myparmstruct.co);
/* This next field should only be set if parms[1] is non-zero */
/* strcpy(myparmstruct.system,"DCEIMGVN"); */ /* set system to change */
myparmstruct.myparms.opcode = CFGOP_ADM_THREADS;
myparmstruct.myparms.parms[0] = sizeof(syscall_parmlist);
myparmstruct.myparms.parms[1] = 0;
/* Only specify a non-zero offset for the next field (parms[1]) if */
/* you are running z/OS 1.7 and above, and */
/* you want to configquery to a different system */
/* myparmstruct.myparms.parms[1] = sizeof(syscall_parmlist) + sizeof(CFG_OPTION); */
myparmstruct.myparms.parms[2] = 0;
myparmstruct.myparms.parms[3] = 0;
myparmstruct.myparms.parms[4] = 0;
myparmstruct.myparms.parms[5] = 0;
myparmstruct.myparms.parms[6] = 0;
memset(coptr,0,sizeof(CFG_OPTION));
memcpy(coptr->co_eye,CFGO_EYE,4);
coptr->co_ver=CO_VER_INITIAL;
coptr->co_len=(int) sizeof(CFG_OPTION);
strcpy(coptr->co_string,new_adm_threads); /* set new adm_thread value */
BPX1PCT("ZFS ",
ZFSCALL_CONFIG, /* Config operation */
sizeof(myparmstruct), /* Length of Argument */
(char *) &myparmstruct, /* Pointer to Argument */
&bpxrv, /* Pointer to Return_value */
&bpxrc, /* Pointer to Return_code */
&bpxrs); /* Pointer to Reason_code */
if (bpxrv < 0) {
printf("Error setting config -adm_threads, BPXRV = %d BPXRC = %d BPXRS = %x\n",bpxrv,bpxrc,bpxrs);
return bpxrc;
}
else {
printf("Config -adm_threads = %s\n",myparmstruct.co.co_string);
}
return 0;
}