Format
#include <xxdtaa.h>
void QXXRTVDA(_DTAA_NAME_T dtaname, short int offset,
short int len, char *dtaptr);
Language Level: ILE C Extension
Threadsafe: Yes.
Job CCSID Interface: All character data sent to this function is expected to be in the CCSID of the job. All character data returned by this function is in the CCSID of the job. See Understanding CCSIDs and Locales for more information.
Description
The following typedef definition is included in the <xxdtaa.h> header file. The character arrays are not null-ended strings so they must be blank filled.
typedef struct _DTAA_NAME_T {
char dtaa_name[10]; /* name of data area */
char dtaa_lib[10]; /* library that contains data area */
}_DTAA_NAME_T;
The QXXRTVDA() function retrieves a copy of the data area specified by dtaname starting at position offset with a length of len. The structure dtaname contains the names of the data area and the library that contains the data area. The values that can be specified for the data area name are:
The parameter dtaptr is a pointer to the storage that receives the retrieved copy of the data area. Only character data can be retrieved using QXXRTVDA.
Example that uses QXXRTVDA()
#include <stdio.h>
#include <xxdtaa.h>
#define DATA_AREA_LENGTH 30
#define START 6
#define LENGTH 7
int main(void)
{
char uda_area[DATA_AREA_LENGTH];
/* Retrieve data from user-defined data area currently in MYLIB */
_DTAA_NAME_T dtaname = {"USRDDA ", "MYLIB "};
/* Use the function to retrieve some data into uda_area. */
QXXRTVDA(dtaname,START,LENGTH,uda_area);
/* Print the contents of the retrieved subset. */
printf("uda_area contains %7.7s\n",uda_area);
}
Related Information