__ae_correstbl_query() — Return coded character set ID type (ASCII and EBCDIC)
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS® UNIX
|
both | z/OS V1R2 |
Format
#include <_Nascii.h>
__argument_t __ae_correstbl_query(void *search_argument, int src_arg_type,
_AE_correstbl_t **ebcdic_entry_ptr,
_AE_correstbl_t **ascii_entry_ptr);
General description
The __ae_correstbl_query() function is a method by which the user can obtain coded character set id (CCSID), type, and correspondence information from the EBCDIC/ASCII Correspondence and CCSID/Codeset Name Lookup Table, CEL4CTBL.
- Argument
- Description
- *search_argument
- A Codeset Name or CCSID search argument.
- src_arg_type
- Specifies whether search_argument is
a Codeset Name or a CCSID, using one of the defined values from <_Nascii.h>:
- _AE_CODESET_SRCH_ARG
- _AE_CCSID_SRCH_ARG
- **ebcdic_entry_ptr
- The address of an _AE_correstbl_t pointer for storing the EBCDIC table entry.
- **ascii_entry_ptr
- The address of an _AE_correstbl_t pointer for storing the ASCII table entry.
The function will then populate the supplied pointers with the address of _AE_correstbl_t structures containing the requested codeset's table entry as well as the address of the corresponding codeset's entry. However, not every EBCDIC codeset in the table has a corresponding ASCII encoding and vice versa. When a corresponding codeset does not exist, the pointer value returned in that argument is zero.
For consistency, the first _AE_correstbl_t pointer address argument will be populated with the EBCDIC entry address, and the second _AE_correstbl_t pointer will be populated with the ASCII entry address, regardless of which was the requested codeset and which was the corresponding codeset.
The __argument_t return value for __ae_correstbl_query() indicates the EBCDIC or ASCII type of the provided codeset.
Returned value
- _AE_EBCDIC_TYPE, when the requested entry is EBCDIC.
- _AE_ASCII_TYPE, when the requested entry is ASCII.
If unsuccessful, because the correspondence table cannot be loaded or the provided Codeset Name or CCSID is not valid, __ae_correstbl_query() returns _AE_UNKNOWN_TYPE.