Chapter Contents

Previous

Next
SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference

SAS Data Files

This section describes the SAS data files used in Using SYSTEM 2000 Data in SAS Programs, Browsing and Updating SYSTEM 2000 Data, and Creating and Loading SYSTEM 2000 Databases. Each data file description provides the SAS statements that created the data file and shows the output from the PRINT procedure.


MYDATA.CLASSES Data File

The SAS data file MYDATA.CLASSES is used in Using SYSTEM 2000 Data in SAS Programs. It was created with the following SAS statements:

    libname mydata 'your-SAS-library';
    data mydata.classes;
       input lastname $ 1-10 firstnme $ 15-25 
         class $ 30-50;
       cards;
    AMMER         DAVID          PRESENTING IDEAS
    CANADY        FRANK A.       PRESENTING IDEAS
    GIBSON        MOLLY I.       SUPERVISOR SKILLS
    GIBSON        MOLLY I.       STRESS MGMT
    RICHARDSON    TRAVIS Z.      SUPERVISOR SKILLS
    ;
    run; 
The following PRINT procedure lists the output, shown in SAS Data File MYDATA.CLASSES.
    proc print data=mydata.classes;
       title2 'SAS Data File MYDATA.CLASSES';
    run; 

SAS Data File MYDATA.CLASSES
                       SAS Data File MYDATA.CLASSES                        1
 
       OBS    LASTNAME      FIRSTNME       CLASS
 
         1    AMEER         DAVID          PRESENTING IDEAS
         2    CANADY        FRANK A.       PRESENTING IDEAS
         3    GIBSON        MOLLY I.       SUPERVISOR SKILLS
         4    GIBSON        MOLLY I.       STRESS MGMT
         5    RICHARDSON    TRAVIS Z.      SUPERVISOR SKILLS


V6.BIRTHDY Data File

The SAS data file V6.BIRTHDY is used in Updating a SAS Data File with SYSTEM 2000 Data. It was created with the following SAS statements:

    libname v6 'your-SAS-library';
    data v6.birthdy;
       input lastname $10. firstnme $10. birthday date7.;
       format birthday date7.;
       cards;
    JONES     FRANK     22MAY53
    MCVADE    CURTIS    25DEC54
    SMITH     VIRGINIA  14NOV49
    TURNER    BECKY     26APR50
    ;
    run; 
The following PRINT procedure lists the output, shown in SAS Data File V6.BIRTHDY.
    proc print data=v6.birthdy;
       title2 'SAS Data File V6.BIRTHDY';
       format birthday date7.;
    run; 

SAS Data File V6.BIRTHDY
               SAS Data File V6.BIRTHDY                1
 
       OBS    LASTNAME     FIRSTNME    BIRTHDAY
 
         1    JONES        FRANK       22MAY53
         2    MCVADE       CURTIS      25DEC54
         3    SMITH        VIRGINA     14NOV49
         4    TURNER       BECKY       26APR50


V7.CONSULTING_BIRTHDAYS Data File

The SAS data file V7.CONSULTING_BIRTHDAYS is also used in Updating a SAS Data File with SYSTEM 2000 Data. It was created with the following SAS statements:

data v7.consulting_birthdays;
   input last_name $ 1-13 first_name $ 14-26 
     birthdate DATE7.;
   informat birthdate DATE7.;
   format birthdate DATE7.;
   datalines;
   JOHNSON      ED           30JAN65
   LEWIS        THOMAS       25MAY54
   SMITH        AMANDA       02DEC60
   WILSON       REBECCA      13APR58
run;
The following PRINT procedure lists the output, shown in SAS Data File V.Consulting_Birthdays.
proc print data=V7.consulting_birthdays;
   title2 'V7.Consulting_Birthdays Data File';
run;

SAS Data File V.Consulting_Birthdays
               V7.Consulting_Birthdays Data File            1
 
           obs    last_name   first_name    birthdate
 
             1    JOHNSON      ED           30JAN65
             2    LEWIS        THOMAS       25MAY54
             3    SMITH        AMANDA       02DEC60
             4    WILSON       REBECCA      13APR58


MYDATA.CORPHON Data File

The SAS data file MYDATA.CORPHON is used in Browsing and Updating SYSTEM 2000 Data. It was created with the following SAS statements:

    libname mydata 'your-SAS-library';
    data mydata.corphon;
       input lastname $15. firstnme $15. phone $10.;
       cards;
    BOWMAN         HUGH E.        109 XT901
    FAULKNER       CARRIE ANN     132 XT417
    GARRETT        OLAN M.        212 XT208
    KNAPP          PATRICE R.     222 XT 12
    KNIGHT         ALTHEA         213 XT218
    MILLSAP        JOEL B.        131 XT224
    MUELLER        PATSY          223 XT822
    NATHANIEL      DARRYL         118 XT544
    SALAZAR        YOLANDA        111 XT169
    WATERHOUSE     CLIFTON P.     101 XT109
    ;
    run; 
The following PRINT procedure lists the output:
    proc print data=mydata.corphon;
       title 'SAS Data File MYDATA.CORPHON';
    run; 

SAS Data File MYDATA.CORPHON
                   SAS Data File MYDATA.CORPHON               1
 
           OBS    LASTNAME      FIRSTNME        PHONE
 
             1    BOWMAN        HUGH E.       109 XT901
             2    FAULKNER      CARRIE ANN    132 XT417
             3    GARRETT       OLAN M.       212 XT208
             4    KNAPP         PATRICE R.    222 XT 12
             5    KNIGHT        ALTHEA        213 XT218
             6    MILLSAP       JOEL B.       131 XT224
             7    MUELLER       PATSY         223 XT822
             8    NATHANIEL     DARRYL        118 XT544
             9    SALAZAR       YOLANDA       111 XT169
            10    WATERHOUSE    CLIFTON P.    101 XT109


TRANS.BANKING Data File

The SAS data file TRANS.BANKING is 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. It was created with the following SAS statements:

    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.;
       cards;
    booker, john  74-9838  8349  s  d  $40.00  05jun89
    lopez, pat    38-7274  9896  s  d  $15.67  23jun89
       . 
       .      more data lines
       . 
    run; 
If you were to invoke the PRINT procedure for the BANKING data file, the SAS System would list the output shown here:
    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 DBLOAD examples create and load a three-level SYSTEM 2000 database. Each logical entry is a customer. Records at level one contain data for the accounts by customer; level two records contain transaction data.  [cautionend]

The following SORT procedure sorts the SAS data file by variables CUSTNAME and ACCTNUM:

    proc sort data=trans.banking;
       by custname acctnum;
    run; 
After you create and sort the TRANS.BANKING data file, you can use it to create the sample BANKING database shown in Creating and Loading SYSTEM 2000 Databases. That chapter lists the new database definition and the stored data.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.