This example uses multiple explicit asynchronous statements.
EXEC SQL WAIT ASYNSTMT1, ASYNSTMT2 COMPLETION;
Lines generated by C Preprocessor2:
{ static struct { SQLInt32 RdtCType; SQLInt16 RdtVersn; SQLInt16 RdtDec; char RdtUserid[8]; SQLInt32 RdtEntty; char *RdtCA; char *RdtDAIn; char *RdtDAOut; char *RdtSql; char *RdtRtCon; SQLInt32 RdtAux1; SQLInt32 RdtAux2; char RdtLCS; char RdtComit; char RdtRelse; char RdtExt; char RdtSepBT; char RdtUCStm; char RdtCmpat; char RdtComp; SQLInt16 RdtXTotL; char RdtXFill[2]; struct { SQLInt16 RdtXLen; SQLInt16 RdtXType; SQLInt32 RdtXCode; } RdtX005; struct { SQLInt16 RdtXLen; SQLInt16 RdtXType; SQLInt32 RdtXAsyC; struct { SQLInt16 RdtXAsyL; char RdtXAsyT[30]; } RdtXAsyS[2]; } RdtX008; } RDTIN022 = {470,10,0,{' '},0,0,0,0,0,0,3,0,'N','B','N','Y','N','N',' ','C', 84,{' '},{8,5,255},{72,8,2,{{9,'A','S','Y','N','S','T','M','T', '1',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' '},{9,'A','S','Y','N','S','T','M','T','2', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' '}}}}; RDTIN022.RdtCA = (char *)(&sqlca); RDTIN022.RdtRtCon = SQL_RDTRTCON; TDARDI(&RDTIN022); SQL_RDTRTCON = RDTIN022.RdtRtCon; }