Open topic with navigation

TIBCO® Managed File Transfer Platform Server for z/OS 8.1.0

# SETC

You can use this function to change the value of data in a variable. This function can be used to concatenate many variables into a single variable.

The format of the SETC function is `SETC %target = "operand2" { +- "Operand3"}`

The SETC function can be expressed using various methods. All expression methods require a variable to be in the target field of the function. When a variable is used as operand2 or operand3, the variable must have been initialized. Otherwise, an error occurs. Character data or variables specified in operand2 or operand3 must be enclosed in double quotation marks.

The SETC function is similar to the SET function, with the following exceptions:

- It works for character variables only.
- You must enclose the operands in double quotation marks, even when the operand is a script variable.
- Variable substitution performed by the script program for operand2 and operand3 are not enclosed in double quotation marks. You must enclose the parameters in double quotation marks.

The following examples show the various expression methods of the SETC function:

- `SETC %A = "TEST.DATA"`

  This command sets the %A variable to `TEST.DATA`.

- `SETC %A = "%A.%B.%C.%D.%E"`

  This commands concatenates the contents of variables %A, %B, %C, %D, and %E, and then assigns the result to the variable %A.

  Note: The period at the end of each variable is a termination character for the variable.
- `SETC %A = "%A..%B..%C..%D..%E"`

  This commands concatenates the contents of variables %A, %B, %C, %D, and %E, and then assigns the result to the variable %A.

  Note: The first period between each variable terminates the variable. The second period between the variables is added to variable %A.
- `SETC %A = "%A" + "%B"`

  This command concatenates the contents of the variable %A to the contents of the variable %B and assigns the result to the variable %A.

Copyright © 2003-2021. TIBCO Software Inc. All Rights Reserved.