|
High-Level Language SWSTRACE (SWCPTM) FunctionRelated Topics
SWSTRACE is the Web Server API function used to write a message into the Shadow OS/390 Web Server's wrap-around trace browse dataset. The message can contain any text desired. If the message is too long to fit within a trace browse record, it is truncated. Truncation is not considered an error.
CALL ArgumentsThe SWSTRACE function takes four arguments. All four arguments must be specified on the call.
Return ValuesSWSTRACE always sets a signed numeric return code value. Possible values are:
PL/I ExampleDCL TCONN PTR; /* Connection Handle */ DCL TDATA CHAR(256); /* Text output area */ DCL TSIZE FIXED BIN(31); /* Text length area */ 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 */ TDATA = 'Trace Message Text'; /* Set output area */ TSIZE = 18; /* set length */ CALL SWSTRACE( TCONN /* output trace message */ TDATA, TSIZE, FB00 ); RC = PLIRETV(); /* get return code */ IF RC ^= SWS_SUCCESS THEN /* exit program if bad RC */ EXIT;
C ExampleHDBC tConn = NULL; /* Connection Handle */ char tData[] = "Null-terminated!"; /* Text string definition */ long RC; /* return code */ rc = SWSTrace( &tConn, /* output trace message */ tData, SWS_NTS, 0 ); if (rc ^= SWS_SUCCESS) return; /* exit program if bad RC */
COBOL Example77 TCONN USAGE IS POINTER. 77 TDATA PIC X(80). 77 TSIZE PIC S9(5) COMP. 77 FB00 PIC S9(5) COMP VALUE 0. MOVE 'TRACE MESSAGE' TO TDATA. MOVE 13 TO TSIZE. CALL 'SWCPTM' USING TCONN, TDATA, TSIZE, FB00. MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE. IF NOT SWS-SUCCESS GOBACK. |