Previous Topic
Table Of Contents
Parent Topic
Next Topic

High-Level Language SWSDECON (SWCPDC) Function

Related Topics

Web Server API Function Index


Can be used in Shadow/REXX.
Can be used from Other REXX interpreters.
HLL entry point name is SWCPDC.

SWSDECON is the Web Server API function used to "de-concatenate" a DDName that was previously concatenated using the SWSCONCT command.

The format of this command is similar in features and functions to the TSO/E DECONCAT command. A text string is used as input in order to provide the parameters necessary to define the file to be concatenated. Files may be concatenated using the SWSCONCT command.

SWCPDC Call Arguments

The SWSDECON (SWCPDC) function arguments are described in the table which follows. Only two of the three arguments are required.

Arg.
No.
HLL Argument Type I/O Description of Argument
C COBOL PL/I
1 LONG PIC
S9(5)
COMP
FIXED
BIN(31)
Input The length of the de-concatenation command string. If the length is longer than the actual command, trailing nulls or blanks will be ignored. If the length is less than the actual command string, the de-concatenation command string will be truncated and possibly cause execution errors. The maximum string length is 32768 bytes.
2 CHAR * PIC
X(nnnnn)
CHAR(nnnnn) Input The de-concatenation command string. See Supported de-concatenation keywords.
3 SWSASB * Usage pointer PTR Output The Shadow OS/390 Web Server Allocation Status Block. This is an optional argument that provides information concerning the status of the de-concatenation request. If you do not specify this argument, you will not have access to the reason code nor the DAIR code.

Return Values

SWSDECON always sets a signed numeric return code value. Possible values are:

SWS_SUCCESS
The operation succeeded. The specified operation was performed.
SWS_ERROR
A parameter validation or run-time error was encountered. Error information is available using the SWSERROR function.
Any other value
The operation failed. Generally this indicates that the file was not de-concatenated. There will be an error message in the Allocation Status Block describing the error.
 
 
Top

Supported De-concatenation Keywords

The SWSDECON (SWCPDC) interface supports the following dataset de-concatenation request parameters:

DDN(DDNAME) Specifies the ddname of the concatenated file.

 

PL/I Example


 
    %INCLUDE SPCPHD
       .
       .
       .
       .
    DCL  COMMAND         CHAR(80)              /* DE-CONCAT COMMAND*/
         INIT('DDN(INFILE)');
    DCL  CMDLEN          FIXED BIN(31);        /* COMMAND LENGTH   */
    DCL  RC              FIXED BIN(31);        /* RETURN CODE      */
 
    CMDLEN = LENGTH(COMMAND);                  /* SET COMMAND LEN  */
 
 
    /* DE-CONCATENATE THE INPUT FILE                               */
 
    CALL SWSDECON(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;
 
Top

C Example


 
    SWS_ALLOCATION_STATUS_BLOCK swsASB; /* response area           */
       .
       .
       .
       .
    long RC;                            /* return code             */
    char szCommand[] = "DDN(INFILE)";
 
 
    /* De-concatenate the input file                               */
 
    rc = SWSDECON(strlen(szCommand),    /* Command Length          */
                  szCommand,            /* Command                 */
                  swsASB);              /* Response area           */
 
    if (rc ^= SWS_SUCCESS)
       do
         printf(swsASB.Error_Message);
         return rc;
       end
 
  
Top

 

COBOL Example


 
  *     NEON API COPY BOOK
    COPY SBCPHD.
        .
        .
        .
        .
    77   COMMAND-LENGTH       PIC S9(5) COMP.
    77   COMMAND              PIC X(80)
         VALUE 'DDN(INFILE)'.
 
  *     DE-CONCATENATE THE INPUT FILE.
 
    MOVE 80 TO COMMAND-LENGTH.
    CALL SWSDECON
        USING COMMAND-LENGTH,
              COMMAND,
              SWS-ALLOCATION-STATUS-BLOCK.
 
    MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE.
    IF NOT SWS-SUCCESS
        DISPLAY 'INFILE DE-CONCATENATION FAILED.' UPON CONSOLE
        DISPLAY SWSASB-ERROR-MESSAGE UPON CONSOLE
        GOBACK.

Top