Delete Memory Allocation (DLTMEMAXCL)
The Delete Memory Allocation (DLTMEMAXCL) command deletes a previously created memory allocation. Either the PTR or the NAME parameter can be used to identify the memory allocation to be deleted. If both PTR and NAME are specified they must both identify the same memory allocation.
This function is also available with command DLTMEMALC 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.
| Keyword | Description | Choices | Notes |
| PTR |
Pointer |
Character value |
Optional, Positional 1 |
| NAME |
Name |
Character value |
Optional, Positional 2 |
Pointer (PTR)
Specifies the pointer value previously returned by either the CRTMEMAXCL or CHGMEMAXCL commands. Upon successful deletion of the memory allocation the pointer will be set to a null value.
- character-value
- Specify the CL pointer variable set to the first byte of the previously allocated storage.
Name (NAME)
Specifies the name of a previously created memory allocation. This name is determined by the CRTMEMAXCL command that created the allocation.
- character-value
- Specify the name of the memory allocation to be deleted.
Examples for DLTMEMAXCL
Example 1: Simple Command Example
CrtMemAXCL Name(MyPointer)
DltMemAXCL Name(MyPointer)
This command deletes the memory allocation identified by the name MyPointer.
Example 2: Complete Example Program
Member MEMAXMP of source file VC2XCL/QCLSRC contains a sample program demonstrating the use of CRTMEMAXCL, CHGMEMAXCL, and DLTMEMAXCL.
Error messages for DLTMEMAXCL
*ESCAPE Messages
- XCL5018
- Memory allocation name &1 is not in use.
- XCL5019
- No memory allocation is currently in use for the PTR value.
- XCL501A
- The PTR value and the NAME value do not refer to the same memory allocation.
- 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.
|