I'm trying to use QWCRDTAA. Works fine in a C program. Can't get it
to work out in a newlook macro. Parameters & values match up (at
least they did at one point or another). I get a script error. I did
break up the lines to make things more readable.

SetFLLIBL
Type (ErrorCode,
BytesProvided as Long,
BytesAvail as Long,
ExceptionID as String * 7,
Reserved as String * 1,
ExceptionData as String * 100)

Type (DTAARA,
BytesAvail as Long,
BytesReturned as Long,
ValueType as String * 10,
LibraryName as String * 10,
ValueLength as Long,
NumOfDecimals as Long,
Value as String * 1000)

Dim (varDTAARA, DTAARA)
Dim (errorCode, ErrorCode)

SetValue (errorCode.BytesProvided, 116)

RPCDeclare (connection, *LIBL, QWCRDTAA, RetrieveDataArea, , Output
receiverVar as DTAARA, Input sizeofReceiver as Long, Input DTAARA_Name
as String * 20, Input startPos as Long, Input dataLen as Long,
InputOutput errorCode as ErrorCode)
RPCCall (connection, RetrieveDataArea, varDTAARA, 1036, "FLLIBL
*LIBL ", -1, 512, errorCode, )
SetValue (FLLIBL, varDTAARA.Value)

StopMacro


/*
from QSYSINC/H(QWCRDTAA)
*/
typedef _Packed struct Qwc_Rdtaa_Data_Returned
{
int Bytes_Available;
int Bytes_Returned;
char Type_Value_Returned[10];
char Library_Name[10];
int Length_Value_Returned;
int Number_Decimal_Positions;
/*char Value[];*/ /* Varying length
*/
} Qwc_Rdtaa_Data_Returned_t;

typedef struct {
Qwc_Rdtaa_Data_Returned_t q;
char data[1000];
} my_qwcrdtaa;

typedef struct {
Qus_EC_t ec_fields;
char Exception_Data[100];
} error_code_t;

QWCRDTAA(&my, sizeof(my), "FLLIBL *LIBL ", -1, 1000, &ec);