tpf_nameValueLocalRemove: Remove a name-value pair from the name-value pair area for the ECB
This function removes one name-value pair or all name-value pairs from the local name-value pair area.
The function uses the name to determine the name-value pair to be removed.
The local name-value pair area is a protected memory area that is unique for the ECB that calls this function.
Last updated
Added for PUT11.
Format
#include <tpf/tpfapi.h>
int tpf_nameValueLocalRemove(char *name);- name
- A pointer to a null-terminated string that specifies the name in the name-value pair that you want to remove.
Normal return
| Return code | Return value | Description |
|---|---|---|
| TPF_NAMEVALUE_REMOVED | 0 | The name-value pair with the specified name for this ECB is removed. |
Error return
| Return code | Return value | Description |
|---|---|---|
| TPF_NAMEVALUE_NOT_FOUND | -1 | The data value for the specified name is not found for this ECB. |
| TPF_NAMEVALUE_NAME_ERROR | -2 | The name parameter is not valid. A possible cause is that the name parameter was specified as NULL. If this error is returned, the z/TPF system issues the 064031 system error. |
Programming considerations
- The name is case sensitive.
- Only one 064031 system error is issued for each ECB. After the first system error, subsequent system errors are skipped.
Examples
The following example shows how
to remove all the name-value pairs from
the name-value pair area
of an ECB.
#include <tpf/tpfapi.h>
⋮
tpf_nameValueLocalRemove(TPF_NAMEVALUE_REMOVE_ALL); // Remove all name-value pairs