Change User Space Data (CHGUSDXCL)
The Change User Space Data (CHGUSDXCL) command changes data in a user space.
This function is also available with command CHGUSRSPC in library VC2XCL. Any use of this alternative command name should be library qualified in case the i operating system were to use this command name in a future release.
Restrictions:
- You must have *EXECUTE authority to the library containing the user space.
- You must have *CHANGE authority to the user space.
| Keyword | Description | Choices | Notes |
| USRSPC |
User space |
Qualified object name |
Required, Positional 1 |
| Qualifier 1: User space |
Name |
| Qualifier 2: Library |
Name, *LIBL, *CURLIB |
| OFS |
Offset into user space |
Integer |
Required, Positional 2 |
| VAR |
Variable for user space data |
Character value |
Required, Positional 3 |
| VARLEN |
Length of VAR variable |
Integer, *VAR |
Optional |
User space (USRSPC)
Specifies the qualified name of the user space.
This is a required parameter.
Qualifier 1: User space
- name
- Specify the name of the user space.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current job are searched until the first match is found.
- *CURLIB
- The current library for the job is searched. If no library is specified as the current library, the QGPL library is searched.
- name
- Specify the name of the library to search.
Offset into user space (OFS)
Specifies the offset of the first byte of the user space to be changed. The value of 0 identifies the first byte. This is consistent with system API use of offsets.
This is a required parameter.
- integer
- Specify the byte offset into the space to start writing to.
Variable for user space data (VAR)
Specifies the CL variable data that is to be written to the user space.
This is a required parameter.
- character-value
- Specify the CL variable with the data to be written to the user space.
Length of VAR variable (VARLEN)
Specifies how many bytes of data are to be written to the user space from the CL variable identified by the VAR parameter.
- *VAR
- The amount of data written will equal the declared size of the VAR parameter.
- integer
- Specify the number of bytes to write from the VAR variable. The value must be less than or equal to the declared size of the VAR variable.
Examples for CHGUSDXCL
Example 1: Simple Command Example
Dcl Var(&Header) Type(*Char) Len(192)
ChgUSDXCL UsrSpc(QTEMP/LSTUSRSPC) Ofs(0) Var(&Header)
This example writes 192 bytes from the CL variable &Header to the first 192 bytes of the user space LSTUSRSPC in library QTEMP.
Error messages for CHGUSDXCL
*ESCAPE Messages
- XCL501B
- VARLEN value of &1 is greater than the declared length of the VAR parameter.
- XCL9002
- Function did not complete. See previously listed messages related to possible user errors.
- XCL9003
- Function did not complete. See previously listed messages for possible cause.
- XCL9004
- Function did not complete. See previously listed messages for possible cause.
- XCL9005
- Function did not complete. Contact your service provider.
- CPF3C04
- User space &1 not changed.
- CPF3C06
- Information not retrieved from user space &1.
- CPF3C0F
- Value &1 for starting position parameter is not valid.
- CPF3C12
- Length of data is not valid.
- CPF3C14
- Starting position &1 and length &2 cause space overflow.
- CPF9801
- Object &2 in library &3 not found.
- CPF9802
- Not authorized to object &2 in &3.
- CPF9803
- Cannot allocate object &2 in library &3.
- CPF9810
- Library &1 not found.
- CPF9820
- Not authorized to use library &1.
|