Chapter Contents |
Previous |
Next |
SAS/ACCESS Interface to IMS-DL/I Software |
You can use batch mode to create the access descriptor MYLIB.WIRETRN and the view descriptor VLIB.WIREDATA. Because IMS-DL/I does not have a dictionary or store descriptive information about IMS-DL/I databases, you must provide the database definition in the SAS statements following the procedure statement. You can also create view descriptors in the same PROC ACCESS execution after the access descriptor statements are entered. (See ACCESS Procedure Reference for a list of valid options that you can use with PROC ACCESS.) Here is the general format for creating descriptors:
proc access options; statements; run;
Creating Access and View Descriptors in One PROC Step |
The following example shows how to create the access descriptor MYLIB.WIRETRN based on the IMS-DL/I database WIRETRN. The view descriptor VLIB.WIREDATA is based on this access descriptor. After the following example, each SAS/ACCESS statement is explained in the order of appearance in the program:
JCL statements; libname mylib 'access-descriptor libref'; libname vlib 'view-descriptor libref'; proc access dbms=ims; create mylib.wiretrn.access; database=wiretrn dbtype=hdam; record='wire transaction' segment=wiretran seglng=100; item='ssn - account' level=2 dbformat=$23. search=ssnacc key=y; item='account type' level=2 dbformat=$1. search=accttype; item='wire date' level=2 dbformat=$8. search=wiredate; item='wire time' level=2 dbformat=$8. search=wiretime; item='wire amount' level=2 dbformat=pd5.2 search=wireammt dbcontent=l; item='wire descript' level=2 dbformat=$40. search=wiredesc; an=y; list all; create vlib.wiredata.view psbname=acctsam pcbindex=5; select 'wire transaction'; list view; run;
Here is an explanation of the statements in this example. See Procedure Statements for complete reference information on these statements.
libname mylib='libref.access-descriptor';
proc access dbms=ims;
create mylib.wiretrn.access;
database=wiretrn dbtype=hdam;
record='wire transaction' segment=wiretran
seglng=100;
item='ssn - account' level=2 dbformat=$23.
search=ssnacc key=y;
item='account type' level=2 dbformat=$1.
search=accttype;
item='wire date' level=2 dbformat=$8. search=wiredate;
item='wire time' level=2 dbformat=$8. search=wiretime;
item='wire amount' level=2 dbformat=pd5.2
search=wireammt dbcontent=l;
item='wire descript' level=2 dbformat=$40.
search=wiredesc;
an=y;
list all;
create vlib.wiredata.view psbname=acctsam
pcbindex=5;
select 'wire transaction';
list view;
run;
Creating Access and View Descriptors in Separate PROC Steps |
proc access dbms=ims; create mylib.wiretrn.access; database=wiretrn dbtype=hdam; record='wire transaction' segment=wiretran seglng=100; item='ssn - account' level=2 dbformat=$23. search=ssnacc key=y; item='account type' level=2 dbformat=$1. search=accttype; item='wire date' level=2 dbformat=$8. search=wiredate; item='wire time' level=2 dbformat=$8. search=wiretime; item='wire amount' level=2 dbformat=pd5.2 search=wireammt dbcontent=l; item='wire descript' level=2 dbformat=$40. search=wiredesc; an=y; list all; run; proc access dbms=ims accdesc=mylib.wiretrn; create vlib.wiredata.view psbname=acctsam pcbindex=5; select 'wire transaction'; list view; run;
Note that the statement
proc access dbms=ims
is
repeated in this example. See Creating Access and View Descriptors in One PROC Step
for complete reference information on this statement.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.