The SAS data file Trans.Banking (used in 'Creating and Loading SYSTEM 2000 Databases”,
as input to
the DBLOAD procedure to create and load data into the SYSTEM 2000
database Banking) was created by using the following SAS program:
libname trans 'your.SAS.library';
data trans.banking;
input custname & $20.
custid & $7.
acctnum & 4.
accttyp & $1.
transtyp & $1.
transamt & dollar10.2
transdat & date7.;
format acctnum 4.
transamt dollar10.2
transdat date7.;
informat transdat date.;
datalines;
booker, john 74-9838 8349 s d $40.00 05jun89
lopez, pat 38-7274 9896 s d $15.67 23jun89
...more data lines
;
The output shows the
results after running the following program on the data file:
proc print data=trans.banking;
title 'Data in SAS Data File TRANS.BANKING';
run;
SAS Data File Trans.Banking
Data in SAS Data File TRANS.BANKING
1
OBS CUSTNAME CUSTID ACCTNUM ACCTTYP TRANSTYP TRANSAMT TRANSDAT
1 BOOKER, JOHN 74-9838 8349 S D $40.00 05JUN89
2 LOPEZ, PAT 38-7274 9896 S D $15.67 23JUN89
3 JONES, APRIL 85-4941 4141 C W $213.78 29JUN89
4 BOOKER, JOHN 74-9838 8349 S I $34.76 30JUN89
5 MILLER, NANCY 07-6163 7890 S I $53.98 30JUN89
6 LOPEZ, PAT 38-7274 9896 S I $16.43 30JUN89
7 JONES, APRIL 85-4941 4141 C W $354.70 30JUN89
8 MILLER, NANCY 07-6163 7890 S D $1,245.87 01JUL89
9 JONES, APRIL 85-4941 4141 C D $2,298.65 01JUL89
10 MILLER, NANCY 07-6163 3876 C W $45.98 08JUL89
11 ROGERS, MIKE 96-5052 4576 C D $75.00 10JUL89
12 BOOKER, JOHN 74-9838 3673 C D $150.00 10JUL89
13 LOPEZ, PAT 38-7274 9896 S D $50.00 10JUL89
14 BOOKER, JOHN 74-9838 3673 C W $65.43 13JUL89
15 ROGERS, MIKE 96-5052 4576 C W $12.34 13JUL89
16 ROGERS, MIKE 96-5052 4576 C W $45.67 13JUL89
17 MILLER, NANCY 07-6163 3876 C D $56.79 14JUL89
18 ROGERS, MIKE 96-5052 4576 C W $12.16
15JUL89
Note: The input SAS data file Trans.Banking must
be sorted before you can use the data for the examples in
Creating and Loading SYSTEM 2000 Databases. The programs using PROC DBLOAD create
and load a three-level SYSTEM 2000 database. Each logical entry represents
a customer. Records at level 1 contain data for the accounts by customer;
records at level 2 contain transaction data.
The following program sorts the input SAS data file Trans.Banking by the variables
CUSTNAME and ACCTNUM:
proc sort data=trans.banking;
by custname acctnum;
run;
After you sort the data file Trans.Banking, you can use it to create the database
Banking
(shown in Creating and Loading SYSTEM 2000 Databases), which also contains the new
database definition and the stored data.