|
High-Level Language SWSWTO (SWCPWT) FunctionRelated Topics
The SWSWTO function allows a message to be written to the MVS operator console. Optionally, a route code can be supplied. If a zero route code is coded, the default will be used. The route code is one of four constants, which is described below. Each constant determines a set of route and descriptor codes, which is described in the IBM publication - - Assembler Services Reference. CALL ArgumentsThe SWSWTO function takes four arguments. All four arguments must be specified on the call.
Return ValuesSWSWTO always sets a signed numeric return code value. Possible values are:
PL/I ExampleDCL TCONN PTR; /* Connection Handle */ DCL TDATA CHAR(70); /* 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 */ ADDR(TCONN)->DMHX = 0; /* Clear Connection Handle */ TDATA = 'WTO Message Text'; /* Set output area */ TSIZE = 16; /* set length */ CALL SWSWTO( TCONN /* output trace message */ TDATA, TSIZE, SWS-WTO-INFO ); 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 = SWSWto( &tConn, /* output trace message */ tData, SWS_NTS, SWS-WTO-INFO ); if (rc ^= SWS_SUCCESS) return; /* exit program if bad RC */ COBOL Example77 TCONN USAGE IS POINTER. 77 TDATA PIC X(70). 77 TSIZE PIC S9(5) COMP. 77 DESC PIC S9(5) COMP VALUE 12. 77 ROUTE PIC S9(5) COMP VALUE 1. MOVE 'WTO MESSAGE' TO TDATA. MOVE 11 TO TSIZE. CALL 'SWCPWT' USING TCONN, TDATA, TSIZE, SWS-WTO-INFO. MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE. IF NOT SWS-SUCCESS GOBACK.
|