|
High-Level Language SWSQueryQueue (SWCPQQ) FunctionRelated Topics
SWSQueryQueue is the Web Server API function used to query the external data queue associated with the current Web transaction thread. The function returns information about the overall queue size, maximum size of each line, and number of queued lines. 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 SWSQueryQueue function takes four arguments, all of which are required.
Return ValuesSWSQueryQueue 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 LINESIZE FIXED BIN(31) INIT(0); /* Maximum Line Size */ DCL MAXLINES FIXED BIN(31) INIT(0); /* Total Lines */ DCL QUEUED FIXED BIN(31) INIT(0); /* Queued Lines */ ADDR(TCONN)->DMHX = 0; /* Clear Connection Handle */ CALL SWSQueryQueue( TCONN /* query the queue */ LINESIZE, MAXLINES, QUEUED ); RC = PLIRETV(); /* get return code */ IF RC ^= SWS_SUCCESS THEN /* exit program if bad RC */ EXIT;
C ExampleHDBC tConn = NULL; /* Connection Handle */ SDWORD tLineSize = 0; /* Lines Size */ SDWORD tMaxLines = 0; /* Total lines */ SDWORD tQueued = 0; /* Queued Lines */ long RC; /* return code */ rc = SWSQueryQueue( &tConn, /* query the queue */ &tLineSize, &tMaxLines, &tQueued ); if (rc ^= SWS_SUCCESS) return; /* exit program if bad RC */
COBOL Example77 TCONN USAGE IS POINTER. 77 TLINESSIZE PIC S9(5) COMP VALUE 0. 77 TMAXLINES PIC S9(5) COMP VALUE 0. 77 TQUEUED PIC S9(5) COMP VALUE 0. CALL 'SWCPQQ' USING TCONN, TLINESIZE, TMAXLINES, TQUEUED. MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE. IF NOT SWS-SUCCESS GOBACK. |