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 EDIT<br />

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

B2C (conversion order)<br />

Specifies that the input data contains a text string. The text string is converted<br />

into its equivalent, internal, binary representation. For example, if the input is<br />

1100000111000010 B2C returns AB.<br />

The input data must be in exact multiples of eight characters. The converted<br />

data is one-eighth the length of the original.<br />

B2C is the inverse of C2B.<br />

C2B (conversion order)<br />

Specifies that the input data is treated as a string of Boolean values. The input<br />

data is converted to a text string representing the individual bits. For example,<br />

if the input is AB, C2B returns 1100000111000010.<br />

C2B is especially useful in converting bit string data such as that returned from<br />

DESC (IFRAUWDS) to a readable <strong>for</strong>m.<br />

Because C2B returns a character string 8 times longer than the original, you<br />

can easily generate a message which exceeds the 32 000 character limit <strong>for</strong><br />

<strong>NetView</strong> messages. Use C2B to convert only the substring requiring<br />

conversion. For more in<strong>for</strong>mation, see the conversion order <strong>for</strong> “SUBSTR” on<br />

page 115.<br />

C2B is the inverse of B2C.<br />

C2D (conversion order)<br />

Specifies that the input data is treated as a 2's complement binary number. This<br />

input data is then converted into a positive or a negative decimal number. For<br />

example, if the input is 1, C2D returns a result of -15. If the input is AB, C2D<br />

returns a result of -15934, as shown in the following example:<br />

PIPE LIT /AB/<br />

| EDIT 1.* C2D<br />

| CONS ONLY<br />

If the input is hexadecimal data and this data must be interpreted as a positive<br />

number, use PAD as the global order. The following example returns a result of<br />

49602:<br />

PIPE LIT /AB/<br />

| EDIT PAD ’00’X 1.* RIGHT 3 C2D<br />

| CONS ONLY<br />

Use C2D with an input of 4 characters or less. The results of C2D are<br />

unpredictable with an input of more than 4 characters. Use C2D to convert<br />

only the substring requiring conversion.<br />

C2D is the inverse of D2C.<br />

C2F (conversion order)<br />

Specifies that the input data is converted to a displayable floating point<br />

notation. The input can be a 2– to 8–byte floating point number. The converted<br />

value is a 22–byte, right-aligned, output string in the <strong>for</strong>m -n.mmmmmE-dd where<br />

the exponent E-dd and the decimal point are only included if the converted<br />

number requires. When the exponent E-dd is not produced, the output is<br />

equivalent to packed decimal.<br />

A maximum of 17 decimal digits are used in the conversion with leading and<br />

trailing zeros stripped. An 18th digit is calculated and used to round the<br />

results. For example, the repeating decimal number 1.9999999... is converted to<br />

2.

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

Saved successfully!

Ooh no, something went wrong!