VSAM View Text File Import Specification

The VSAM VIEW text file import specification can be used to populate your CDD with predefined CONNX Views using the VSAM Text Import Option.

The VIEW text file import specification layout is described below.

The first line of each view layout must contain CONNXVIEW and the view object name as follows:

CONNXVIEW <VIEWOBJECTNAME>

The subsequent lines of each view layout must contain the SQL Select statement:

SELECT ...

The last or footer line in each view must contain:

ENDVIEW

One import text file may contain multiple views, each starting with the same header line shown above and with a footer line with the word ENDVIEW.

The following is an example of a VSAM VIEW import file.

 

CONNXVIEW, NWORDERS

/*This view was requested by Johnathon Jones on 3/1/2001. He executes this view daily to see orders for the Northwest Territory. */

SELECT

ORDERS_VSAM.orderid as 'Order' /* Order Number */,

ORDERS_VSAM.customerid as 'Cust Id' /* Customer Identification */,

CUSTOMERS_VSAM.customername as 'Name' /* Name of Customer*/,

CUSTOMERS_VSAM.customerstate as 'ST' /* State Ordered by */,

ORDERS_VSAM.orderdate as 'Ord Date' /* Date Ordered */,

ORDERS_VSAM.productid as 'Product' /* Product number */,

PRODUCTS_VSAM.productname as 'Description' /* Product Description */,

ORDERS_VSAM.productquantity as 'Qty' /* order quantity */,

PRODUCTS_VSAM.productprice as 'Price' /* price per unit */,

(ORDERS_VSAM.productquantity * PRODUCTS_VSAM.productprice) as 'Ext Price' /* Calculate extended price) */

FROM ORDERS_VSAM, CUSTOMERS_VSAM, PRODUCTS_VSAM /* Tables included in view */

WHERE ORDERS_VSAM.customerid=CUSTOMERS_VSAM.customerid AND

ORDERS_VSAM.productid=PRODUCTS_VSAM.productid and CUSTOMERS_VSAM.customerstate in ('WA', 'OR', 'MT', 'ID', 'CA') /* Join tables together and select only Northwest states */

ENDVIEW