Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ASSIGN-STREAM Assign S variable stream

&pagelevel(4)&pagelevel

Domain: PROCEDURE

Command description

The ASSIGN-STREAM command is used to assign an S variable stream for structured outputs to an (output) server that controls further processing of the variable stream.

(For further details see chapter “S variable streams”.)

Format

ASSIGN-STREAM

STREAM-NAME = SYSVAR / SYSMSG / SYSINF / <structured-name 1..20>

,TO = *STD / <structured-name 1..20> / *DUMMY / *SAME-AS-CALLING-PROC / *VARIABLE(...) /

*SERVER(...)

*VARIABLE(...)

VARIABLE-NAME = *NONE / <composed-name 1..255>(...)

<composed-name 1.255>(...)

WRITE-MODE = *EXTEND / *PREFIX

,RETURN-VARIABLE-NAME = *NONE / <composed-name 1..255>(...)

<composed-name 1.255>(...)

WRITE-MODE = *EXTEND / *PREFIX

,CONTROL-VAR-NAME = *NONE / <composed-name 1..255>(...)

<composed-name 1.255>(...)

WRITE-MODE = *EXTEND / *PREFIX

,RET-CONTROL-VAR-NAME = *NONE / <composed-name 1..255>(...)

<composed-name 1.255>(...)

WRITE-MODE = *EXTEND / *PREFIX

*SERVER(...)

SERVER-NAME = <structured-name 1..30>

,SERVER-INFORMATION = *NONE / <c-string 1..1800>

Operands

STREAM-NAME = <structured-name 1..20> / SYSVAR / SYSMSG / SYSINF
Name of the S variable stream. The constant values SYSINF, SYSMSG and SYSVAR are reserved words. They must not be abbreviated.

SYSINF:

transmits structured outputs from commands and programs

SYSMSG:

transmits structured guaranteed messages

SYSVAR:

transmits structured outputs from commands, programs and structured
guaranteed messages. However, it is still possible to process the different
data items separately.

TO =
Specifies the server which is linked with the S variable stream.

TO = *STD
Default assignment.
The following table shows what values are adopted internally by the default value for TO, for the different combinations which can be formed with the STREAM-NAME operand.

STREAM-NAME=

TO=*STD

Information received

SYSINF

SYSVAR

Structured outputs from commands and programs

SYSMSG

SYSVAR

Structured guaranteed messages

SYSVAR

*DUMMY

Structured outputs from commands and programs, or
structured guaranteed messages

<structured-name 1..20>

*DUMMY

User variable stream

TO = <structured-name 1..20>
Name of the user server.
Any loops in chains of S variable stream assignments will be rejected; e.g.
ASSIGN-STREAM S3,*DUMMY
ASSIGN-STREAM S2,S3
ASSIGN-STREAM S3,S2     SDP0511

TO = *DUMMY
No assignment.
Transmitted variables are lost. The client is informed of this by a warning.

TO = *SAME-AS-CALLING-PROC
Assigns the calling procedure’s server.
If there is no assignment in the calling procedure, the assignment is rejected and the S variable stream remains unaltered.

TO = *VARIABLE(...)
The server is SDF-P.
The transmitted variables are written into the specified S variable, or the return information is read from the specified S variables.

VARIABLE-NAME =
Specifies the S variable into which the transmitted S variable is written (for further details see also the description of TRANSMIT-BY-STREAM, "TRANSMIT-BY-STREAM Transmit variables ").

VARIABLE-NAME = *NONE
The transmitted output variable is ignored.

VARIABLE-NAME = <composed-name 1..255>(...)
Name of the S variable into which the transmitted S variable is written.
The specified S variable must be a list of structures.

WRITE-MODE =
Specifies how the assigned input list is processed.

WRITE-MODE = *EXTEND
The transmitted variables are appended to the assigned S variable as the last element. Variables from different transmissions can be accumulated.

WRITE-MODE = *PREFIX
The transmitted variables are added in to the assigned S variable as the first element. Variables from different transmissions can be accumulated.

RETURN-VARIABLE-NAME =
Specifies the S variable whose contents are transmitted to the remote return variable (for further details see also the description of TRANSMIT-BY-STREAM, "TRANSMIT-BY-STREAM Transmit variables ").

Note

An identical variable specification with the same WRITE-MODE for RETURN-VARIABLE-NAME and for VARIABLE-NAME is not corrected at transmission time. This means that the return variable is overwritten by the variable data.

RETURN-VARIABLE-NAME = *NONE
No transmission; both the local and the remote return variable remain unaltered.

RETURN-VARIABLE-NAME = <composed-name 1..255>(...)
Name of the S variable read by the transmitted return variable.
The specified S variable must be a list of structures.

WRITE-MODE =
Specifies how the return variable or the list of structures is processed.

WRITE-MODE = *EXTEND
The last element of the specified list is removed.
The next transmission will remove the last element left by this transmission. If the list is empty, it will be processed as for RETURN-VARIABLE-NAME = *NONE.

WRITE-MODE = *PREFIX
The first element of the specified list is removed.
The next transmission will remove the first element left by this transmission. If the list is empty, it will be processed as for RETURN-VARIABLE-NAME = *NONE.

CONTROL-VAR-NAME =
Specifies the S variable into which the transmitted control variable is written (for further details see also the description of TRANSMIT-BY-STREAM).

CONTROL-VAR-NAME = *NONE
The transmitted control variable is ignored.

CONTROL-VAR-NAME = <composed-name 1..255>(...)
Name of the S variable into which the transmitted control variable is written.The specified S variable must be a list of structures.

WRITE-MODE =
Specifies how the control variable or the list of structures is processed.

WRITE-MODE = *EXTEND
The transmitted control variables are appended to the assigned S variable as the last element. Control variables from different transmissions can be accumulated.

WRITE-MODE = *PREFIX
The transmitted control variables are added in to the assigned S variable as the first element. Control variables from different transmissions can be accumulated.

RET-CONTROL-VAR-NAME =
Specifies the S variable from which the transmitted return control variable is read (for further details see also the description of TRANSMIT-BY-STREAM, "TRANSMIT-BY-STREAM Transmit variables ").

RET-CONTROL-VAR-NAME = *NONE
The return control variable is ignored, i.e. it remains unaltered.

RET-CONTROL-VAR-NAME = <composed-name 1..255>(...)
Name of the S variable from which the transmitted return control variable is read.The specified S variable must be a list of structures.

WRITE-MODE =
Specifies how the return control variable or the list of structures is processed.

WRITE-MODE = *EXTEND
The last element of the specified list is removed.
The next transmission will remove the last element left by this transmission. If the list is empty, it will be processed as for RET-CONTROL-VAR-NAME = *NONE.

WRITE-MODE = *PREFIX
The first element of the specified list is removed.
The next transmission will remove the first element left by this transmission. If the list is empty, it will be processed as for RET-CONTROL-VAR-NAME = *NONE.

TO = *SERVER(...)
Links the S variable stream with the specified server.

SERVER-NAME = <structured-name 1..30>
Name of the server.

SERVER-INFORMATION =
Information which must be sent to the server: e.g. the name of the format library for FHS.

SERVER-INFORMATION = *NONE
No information must be sent to the server.

SERVER-INFORMATION = <c-string 1..1800>
Text of the message, in the form of a string.

Command return codes

(SC2)

SC1

Maincode

Meaning


0CMD0001No error
20SDP0531Warning returned by server; process continuing

1CMD0202Syntax error

3CMD2203Incorrect syntax file

32
CMD0221System error (internal error)

64CMD0216Do not have required privilege

64SDP0091Semantic error

64SDP0532Server error; command rejected

64SDP0534

Internal server error; command terminated.
Server link terminated following unexpected event or due to shortage or absence of system resources



130
SDP0099

No further address space available

Example

See the SHOW-STREAM-ASSIGNMENT ("SHOW-STREAM-ASSIGNMENT Show S variable stream ") and TRANSMIT-BY-STREAM ("TRANSMIT-BY-STREAM Transmit variables ") commands.