|
High-Level Language SWSClearQueue (SWCPQL) FunctionRelated Topics
SWSClearQueue is the Web Server API function used to clear the external data queue associated with the current Web transaction thread. Clearing the queue marks it as empty. Normally, an external data queue is allocated and used only when executing Shadow/REXX procedures. However, a queue may now also be used from HLL programs. For HLL program executions, an external data queue may be pre-allocated by coding the QUEUESIZE( ) keyword. If one of the SWSxxxxxQueue HLL functions is invoked, an external data queue is created dynamically, using the default size, if one does not already exist.
CALL ArgumentsThe SWSClearQueue function takes one to three arguments; only the first is required.
Return ValuesSWSClearQueue always sets a signed numeric return code value. Possible values are:
PL/I ExampleDCL TCONN PTR; /* Connection Handle */ DCL RC FIXED BIN(31); /* return code */ DCL DMHX FIXED BIN(31) BASED; /* Dummy Handle field */ DCL FB00 FIXED BIN(31) INIT(0); /* Dummy argument */ ADDR(TCONN)->DMHX = 0; /* Clear Connection Handle */ CALL SWSClearQueue( TCONN /* clear the queue */ FB00, FB00); RC = PLIRETV(); /* get return code */ IF RC ^= SWS_SUCCESS THEN /* exit program if bad RC */ EXIT;
C ExampleHDBC tConn = NULL; /* Connection Handle */ SDWORD tDummy = 0; /* dummy argument */ long RC; /* return code */ rc = SWSClearQueue( &tConn, /* clear the queue */ tDummy, tDummy); if (rc ^= SWS_SUCCESS) return; /* exit program if bad RC */
COBOL Example77 TCONN USAGE IS POINTER. 77 FB00 PIC S9(5) COMP VALUE 0. CALL 'SWCPQL' USING TCONN, FB00, FB00. MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE. IF NOT SWS-SUCCESS GOBACK. |