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

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

When a negative return code is received from DB2, the unit of work is rolled<br />

back, unless DB2 indicates that it has already rolled back.<br />

v EDIT is often used to insert indicator words <strong>for</strong> columns that are always present.<br />

v EDIT conversion orders can convert SQL data from one <strong>for</strong>mat to another. See<br />

“PIPE EDIT” on page 76 <strong>for</strong> more in<strong>for</strong>mation.<br />

v The result of a query can be a single 4-byte binary integer; use EDIT to convert<br />

it to decimal, if desired.<br />

/* Determine query size */<br />

"PIPE",<br />

" SQL select count(*) from table1 where KWD < ’C’",<br />

" | EDIT 3.4 C2D 1" ,<br />

" | CONS"<br />

v The <strong>NetView</strong> packages and plans must be bound be<strong>for</strong>e you can access DB2<br />

tables with <strong>NetView</strong> SQL stages. CNMSJSQL is the input to the preparation<br />

process; it is shipped with the <strong>NetView</strong> JCL samples. Your database<br />

administrator gives privileges to the <strong>NetView</strong> system using the GRANT<br />

statement.<br />

v Refer to your DB2 documentation <strong>for</strong> more in<strong>for</strong>mation about preparing the<br />

<strong>NetView</strong> SQL stages plan (DSISQLnn in sample CNMSJSQL).<br />

v Use the definition member DSIDB2DF to specify the DB2 subsystem you want to<br />

use. When DSIDB2MT is started it connects to that DB2. Stopping the<br />

DSIDB2MT task causes it to disconnect from the DB2 subsystem<br />

v An SQL INSERT must have a values() clause specifying literals on MVS. Use<br />

EDIT to construct an insert statement from data in the record.<br />

v To access an MVS database through distributed relational access, export the plan.

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

Saved successfully!

Ooh no, something went wrong!