The DltUsrSpace procedure deletes a *USRSPC (user space) object from the system.
The DltUsrSpace procedure can be used to delete a user space from the system. Once deleted, any information stored in the user space is permanently destroyed.
void DltUsrSpace( szUserSpace 21A Const ) |
|
See also: ChgUsrSpace, CrtUsrSpace |
*...v....1....v....2
'MYSPACE QTEMP '
An alternative syntax is also supported for the user space parameter. The alternate syntax allows you to specify the user space name similar to that of an OS/400 CL command, that is it may be qualified using qualified name syntax, as follows:
*...v....1....v....2
'QTEMP/MYSPACE '
The qualified user space name is MYSPACE in the QTEMP library. Either syntax is acceptable.
- *LIBL (the default)
- *ALL
- *ALLUSR
- *CURLIB
- *USRLIBL
If the user space is deleted, *ON is returned, otherwise, *OFF is returned.
If the function fails, check the XT_ERROR data structure's subfield XT_ERRMsgID for the error message ID indicating why the user space was not deleted.
Normally, the command and user space name are the only values that need to be specified. For example:
.....DName+++++++++++EUDS.......Length+TDc.Functions++++++++++++++++++++++++++
D szUS C Const('QGPL/MYUSRSPC')
.....CSRn01..............OpCode(ex)Extended-factor2+++++++++++++++++++++++++++
C CallP DltUsrSpace(szUS)
The call to DltUsrSpace() deletes the user space named MYUSRSPC in the QGPL library.