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.

Stage Operands Synonym<br />

WRITELINE WL<br />

PIPE EDIT<br />

Command Description<br />

The EDIT stage is a powerful stage which enables you to make a wide variety of<br />

changes, or edits, to a message or command within a pipeline. Possible sources of<br />

the edit data include:<br />

v Message or command data<br />

v Line attributes<br />

v Message attributes<br />

v Literal data<br />

With EDIT, messages or commands can be created or re<strong>for</strong>matted in any fashion<br />

that you want. In some cases modification of the message attributes and line<br />

attributes are also supported.<br />

EDIT can be used to:<br />

v Avoid creating a loop in REXX to manipulate messages.<br />

v Improve per<strong>for</strong>mance. Editing within a pipeline flow is faster than driving a<br />

command to make the changes.<br />

v Preserve message attributes while changing the message text.<br />

v Improve programmer productivity when writing procedures to manipulate<br />

message data.<br />

When used as a first stage, EDIT can be used to create multiline messages from<br />

literals.<br />

Although appearing complex, EDIT is a simple stage consisting of global orders<br />

and edit phrases. Edit phrases define the action to be taken on the data flowing<br />

through the pipeline. Global orders define the overall environment <strong>for</strong> the<br />

subsequent edit phrases. Global orders are optional. Examples of global orders<br />

include:<br />

v Defining padding characters.<br />

v Defining how message data is parsed.<br />

v Providing messages or commands from the input stream to the edit phrase.<br />

v Writing messages or commands from the edit phrase to the output stream.<br />

Notes:<br />

1. Edit phrases operate on only one line at a time. Global orders control which<br />

line of a multiline message is processed by the edit phrase.<br />

2. There are many environments in which edit orders can be run:<br />

v PIPE EDIT<br />

v WHEN statements<br />

v REVISE statements<br />

v Acquire<br />

v AutoEdit<br />

v Common Base Events<br />

3. All orders that are valid <strong>for</strong> REVISE actions are also valid <strong>for</strong> WHEN actions,<br />

except that when used <strong>for</strong> output only, the NEXT, NEXTWORD, and numeric<br />

char position can be used.<br />

Chapter 2. Pipeline Stages and Syntax 81

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

Saved successfully!

Ooh no, something went wrong!