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.

Introduction and Concepts<br />

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

NCCF NETVIEW CNM19 PETE 03/26/10 13:10:00<br />

* CNM19 PIPE < WISHLIST | CONSOLE<br />

| CNM19 CAIRO, EGYPT AFRICA<br />

| CNM19 CASABLANCA, MOROCCO AFRICA<br />

| CNM19 KRUGER PARK AFRICA<br />

| CNM19 NILE RIVER AFRICA<br />

| CNM19 BANGKOK, THAILAND ASIA<br />

| CNM19 GREAT WALL, CHINA ASIA<br />

| CNM19 TOKYO, JAPAN ASIA<br />

| CNM19 YANGTZE RIVER ASIA<br />

| CNM19 ALICE SPRINGS AUSTRALIA<br />

| CNM19 PARIS, FRANCE EUROPE<br />

| CNM19 RHINE RIVER EUROPE<br />

| CNM19 ROME, ITALY EUROPE<br />

| CNM19 GRAND CANYON PARK, ARIZONA, USA N. AMERICA<br />

| CNM19 MISSISSIPPI RIVER N. AMERICA<br />

| CNM19 NEW YORK, NEW YORK, USA N. AMERICA<br />

| CNM19 Y<strong>OS</strong>EMITE PARK, CALIFORNIA, USA N. AMERICA<br />

| CNM19 DANALI PARK, ALASKA, USA N. AMERICA<br />

| CNM19 AMAZON RIVER S. AMERICA<br />

| CNM19 ANDES MOUNTAINS S. AMERICA<br />

| CNM19 RIO DE JANIERO, BRAZIL S. AMERICA<br />

???<br />

Pete is an avid canoeist, so he decides to change the pipeline specification to limit<br />

his selection of vacation spots to those with rivers. He accesses the same disk file<br />

shown in the previous example, but he now enters this PIPE command:<br />

PIPE < WISHLIST<br />

| LOCATE /RIVER/<br />

| LITERAL /Pete’s canoeing adventures/<br />

| CONSOLE<br />

Actually, if Pete had entered that command on a command line, he would have<br />

been limited to three lines and would have entered it in landscape <strong>for</strong>m, but it is<br />

shown here in portrait <strong>for</strong>m <strong>for</strong> ease of reading.<br />

Pete's command uses the LOCATE stage to select all messages that contain the<br />

character string RIVER. Messages not selected are discarded from the pipeline and<br />

are no longer available <strong>for</strong> subsequent processing by other stages. To indicate that<br />

the choices are his, Pete uses the LITERAL stage to add a comment to the pipeline.<br />

The LITERAL stage writes text to the pipeline ahead of messages already there. As<br />

be<strong>for</strong>e, the results are displayed to the operator console, using the CONSOLE<br />

stage.<br />

The specification <strong>for</strong> the LOCATE stage is LOCATE /RIVER/. The operand RIVER is<br />

supplied as a search argument <strong>for</strong> the stage to use when examining messages. The<br />

slash (/) character is the string delimiter.<br />

The specification <strong>for</strong> the LITERAL stage is:<br />

LITERAL /Pete’s canoeing adventures/<br />

The operand (Pete’s canoeing adventures) represents the text to be placed in the<br />

pipeline.<br />

In this example, the

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

Saved successfully!

Ooh no, something went wrong!