28.11.2012 Views

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PIPE SAFE<br />

Streams<br />

Stream Type Number Supported<br />

Input 1<br />

Output 1<br />

Termination Conditions<br />

SAFE terminates when the input stream disconnects.<br />

Operand Descriptions<br />

Usage Notes<br />

Examples<br />

208 <strong>Programming</strong>: <strong>Pipes</strong><br />

APPEND<br />

Specifies that data is added after data that exists in the named SAFE. APPEND<br />

is valid only when using a named SAFE (not used with the default SAFE<br />

because it can contain no more than one message). The APPEND option is not<br />

valid when SAFE is a first stage.<br />

* Specifies that the default SAFE is used.<br />

name<br />

Specifies the 1- to 8-character name of a named SAFE. When the command<br />

procedure group ends, all named SAFEs created by the group go away and the<br />

associated storage is freed.<br />

SEIZE<br />

Use SEIZE <strong>for</strong> per<strong>for</strong>mance improvement when you do not need the contents<br />

of the safe to remain in the safe after a read operation.<br />

v The only access to a named SAFE is through the SAFE stage.<br />

v Any REXX command list that is called by the REXX CALL instruction or is<br />

invoked as a REXX function uses the same default SAFE as its caller.<br />

v Because named safes are shared among command procedures, verify that the<br />

names you select are not already in use <strong>for</strong> another purpose. For example, if<br />

your command list invokes the WINDOW command (CNME1505), do not use<br />

the safe names that are already used by the WINDOW command, such as<br />

MSGS.<br />

Example: Determining Whether a Named SAFE Exists<br />

Use the following test to determine if a given named SAFE (MYSAFE) exists.<br />

/* REXX sample command list */<br />

’PIPE SAFE MYSAFE’,<br />

’| VAR X’<br />

IF SYMBOL(’X’) = ’LIT’ THEN<br />

Say ’MYSAFE was not found.’<br />

ELSE<br />

Say ’MYSAFE was found.’<br />

Example: Creating a Named SAFE That Contains a NULL<br />

Message<br />

A named SAFE can exist and can contain a 'NULL' message. The following<br />

example shows how to create a named SAFE which contains a NULL message.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!