|
|
Deprecated SWSFILE (SWCPFI) Sub-Function: SWS_FILE_PDSSENDThis sub-function is being retired in favor of the enhanced SWS_FILE_SEND sub-function. In future, new enhancements will only be made to the enhanced sub-function. We recommend that all new HLL application be written using the enhanced SWS_FILE_SEND function. Previously written HLL programs need not be re-written; the Server will continue to support the deprecated SWS_FILE_PDSSEND interface as documented on this page.
CALL Arguments For the Deprecated FunctionThe SWSFILE function takes six arguments. All six arguments must be specified.
Return ValuesSWSFILE always sets a signed numeric return code value. Possible values are:
PL/I Example
DCL SCONN PTR; /* Connection Handle */
DCL SDDNA CHAR(8) INIT('HTMFILE'); /* File DD name */
DCL SMENA CHAR(8) INIT('HLLFILE'); /* Member name */
DCL SCOTY CHAR(50) INIT('text/html'); /* Content type */
DCL RC FIXED BIN(31); /* return code */
DCL DMHX FIXED BIN(31) BASED; /* Dummy Handle field */
ADDR(SCONN)->DMHX = 0; /* Clear Connection Handle */
CALL SWSFILE( SCONN /* send the text data */
SWS_FILE_PDSSEND,
SWS_SEND_TEXT,
SDDNA,
SMENA,
SCOTY );
RC = PLIRETV(); /* get return code */
IF RC ^= SWS_SUCCESS THEN /* exit program if bad RC */
EXIT;
C Example
HDBC sConn = NULL; /* Connection Handle */
long RC; /* return code */
rc = SWSFILE( &sConn, /* send the text data */
SWS_FILE_PDSSEND,
SWS_SEND_TEXT,
"HTMFILE",
"HLLFILE",
"text/html" );
if (rc ^= SWS_SUCCESS) return; /* exit program if bad RC */
COBOL Example
77 SCONN USAGE IS POINTER.
77 SDDNA PIC X(8) VALUE 'HTMFILE'.
77 SMENA PIC X(8) VALUE 'HLLFILE'.
7 SCOTY PIC X(50) VALUE 'text/html'.
CALL 'SWCPFI' USING SCONN,
SWS-FILE-PDSSEND,
SWS-SEND-TEXT,
SDDNA,
SMENA,
SCOTY.
MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE.
IF NOT SWS-SUCCESS GOBACK.
| ||||||||||||||||||||||||||||||||||||||||||||||