|
|
High-Level Language SWSCONCT (SWCPCC) FunctionRelated Topics
SWSCONCT is the Web Server API function used to concatenate multiple DDNames under a single DDName. The format of this command is similar in features and functions to the TSO/E CONCAT command. A text string is used as input in order to provide the parameters necessary to define the files to be concatenated. Files may be "de-concatenated" using the SWSDECON command.
SWCPCC Call ArgumentsThe SWSCONCT (SWCPCC) function arguments are described in the table which follows. Only two of the three arguments are required.
Return ValuesSWSCONCT always sets a signed numeric return code value. Possible values are:
Supported Concatenation KeywordsThe SWSCONCT (SWCPCC) interface supports the following dataset concatenation request parameters:
PL/I Example
%INCLUDE SPCPHD
.
.
.
.
DCL COMMAND CHAR(80) /* CONCATENATE CMD */
INIT('DDN(INFILE1 INFILE2)');
DCL CMDLEN FIXED BIN(31); /* COMMAND LENGTH */
DCL RC FIXED BIN(31); /* RETURN CODE */
CMDLEN = LENGTH(COMMAND); /* SET COMMAND LEN */
/* CONCATENATE THE INPUT FILES */
CALL SWSCONCT(CMDLEN, /* COMMAND LENGTH */
COMMAND, /* COMMAND */
SWSASB); /* ALLOCATION STATUS BLOCK */
RC = PLIRETV(); /* GET RETURN CODE */
IF RC ^= SWS_SUCCESS THEN /* EXIT PROGRAM IF BAD RC */
EXIT;
C Example
SWS_ALLOCATION_STATUS_BLOCK swsASB; /* response area */
.
.
.
.
long RC; /* return code */
char szCommand[] = "DDN(INFILE1 INFILE2)";
/* Concatenate the input files */
rc = SWSCONCT(strlen(szCommand), /* Command Length */
szCommand, /* Command */
swsASB); /* Response area */
if (rc ^= SWS_SUCCESS)
do
printf(swsASB.Error_Message);
return rc;
end
COBOL Example
* NEON API COPY BOOK
COPY SBCPHD.
.
.
.
.
77 COMMAND-LENGTH PIC S9(5) COMP.
77 COMMAND PIC X(80)
VALUE 'DDN(INFILE1 INFILE2)'.
* CONCATENATE THE INPUT FILES
MOVE 80 TO COMMAND-LENGTH.
CALL SWSCONCT
USING COMMAND-LENGTH,
COMMAND,
SWS-ALLOCATION-STATUS-BLOCK.
MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE.
IF NOT SWS-SUCCESS
DISPLAY 'FILE CONCATENATION FAILED.' UPON CONSOLE
DISPLAY SWSASB-ERROR-MESSAGE UPON CONSOLE
GOBACK.
| ||||||||||||||||||||||||||||||||||||||