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.

Examples<br />

E2A<br />

Specifies that EBCDIC characters are translated to ASCII. EBCDIC code set<br />

<strong>IBM</strong>-1047 and ASCII code set ISO 8859-1 are used. Use XLATE COMMON to<br />

remove <strong>for</strong>mat control characters (<strong>for</strong> example, line feed, new line, and end of<br />

file) be<strong>for</strong>e you translate host messages to ASCII.<br />

LOWER<br />

Specifies that the standard 26 Latin letters are translated to lowercase.<br />

Example: Removing Characters Using PIPE XLATE COMMON<br />

The following is an example of using PIPE XLATE COMMON to remove<br />

characters that cannot be translated be<strong>for</strong>e converting EBCDIC text to ASCII text:<br />

’PIPE NETV LIST STATUS=TASKS’,<br />

’| XLATE COMMON’,<br />

’| XLATE E2A’,<br />

’| NETV SOCKET TYPE=SEND SOCKID=0’,<br />

’| WAIT 5’,<br />

’| CONS’<br />

Example: Translating Text to ASCII Prior to Using the SOCKET<br />

Command<br />

The following is an example of translating text to ASCII prior to using the<br />

SOCKET command:<br />

’PIPE (NAME SENDto0)’, /* send on socket ID 0*/<br />

’| VAR data_string’, /* EBCDIC data to send*/<br />

’| XLATE E2A’, /* convert to ASCII */<br />

’| NETV SOCKET TYPE=SEND SOCKID=0 ’, /*send ASCII data*/<br />

’| WAIT MOE 5’, /* wait <strong>for</strong> result */<br />

’| STEM msgsock.’ /* msgs about send */<br />

PIPE XLATE<br />

Example: Translating an ASCII Value to EBCDIC<br />

The following sample PIPE command translates the data taken from the linedata<br />

variable from ASCII to EBCDIC and stores the translated data back into the linedata<br />

variable:<br />

’PIPE | VAR linedata | XLATE A2E |VAR linedata’<br />

Chapter 2. Pipeline Stages and Syntax 277

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

Saved successfully!

Ooh no, something went wrong!