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

See also the conversion order <strong>for</strong> “F2C” on page 113 and the conversion order<br />

<strong>for</strong> “C2S.”<br />

C2G (conversion order)<br />

Converts fixed-length strings to double-byte (DBCS) character strings by<br />

adding a shift-out character in front of the string and a shift-in after the string.<br />

C2G is the inverse of G2C.<br />

This conversion order is particularly useful when dealing with data interacting<br />

with the SQL pipe stage.<br />

C2GV or C2VG (conversion order)<br />

Converts varying-length strings to double-byte (DBCS) character strings by<br />

adding a shift-out character in front of the string and a shift-in after the string.<br />

The input string must start with a 2-byte length field containing the number of<br />

DBCS characters. The number of data bytes after the length field must be twice<br />

the value of the length field because each DBCS character is represented by<br />

two bytes of data. The length field is not copied to the converted string.<br />

C2GV is the inverse of GV2C.<br />

This conversion order is particularly useful when dealing with data interacting<br />

with the SQL pipe stage.<br />

C2P (conversion order)<br />

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

of a specified precision. Scale indicates the number of decimal digits retained.<br />

v If scale is 0 (zero), the resulting number is an integer. For example, C2P<br />

0converts the input X'123C' to 123.<br />

v If scale is positive, the resulting number has scale number digits after the<br />

decimal point. For example, C2P 2 converts the input X'123C' to 123.45.<br />

v If scale is negative, the resulting number has scale zeros added to the<br />

number. For example, C2P -1 converts the input X'123C' to 120.<br />

C2P is the inverse of P2C.<br />

C2S (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 14–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 included only if required by the<br />

converted number. 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.<br />

See also the conversion order <strong>for</strong> “F2C” on page 113 and the conversion order<br />

<strong>for</strong> “C2F” on page 110.<br />

C2V (conversion order)<br />

Specifies that the input data is a variable length string to be converted to a<br />

displayable string. The input data starts with a 2–byte, unsigned length value<br />

indicating the length of the string.<br />

C2V is the inverse of V2C.<br />

This conversion order is particularly useful when dealing with data interacting<br />

with the SQL pipe stage.<br />

Chapter 2. Pipeline Stages and Syntax 111

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

Saved successfully!

Ooh no, something went wrong!