Download From FoxPro for Windows to SAS Systems for Mainframes

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

IMDb wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Database wikipedia , lookup

Relational model wikipedia , lookup

Functional Database Model wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Transcript
From FoxPro® for Windows1M to SAS® Systems for Mainframes
Monica Johnston, Northern California Cancer Center, Union City, CA
Susan LeRoy Stewart, Northern California Cancer Center, Union City, CA
ABSTRACT
Data are constantly being transferred--from a personal
computer to a mainframe, from a database file to an
ASCII file to a SAS data set. This paper will guide
the novice user through an efficient process for
creating a mainframe SAS data set from a Fox.Pro for
Windows database file. It will hail the advantages of
using the DSD option of the INFILE statement in
conjunction with list input yet will demonstrate the
caveats of using list input. Moreover, it will include
tips that can be used throughout the process to ensure
accuracy.
INTRODUCTION
Although SAS" System for Personal Computers can
directly read a FoxPro database file, mainframe
versions of SAS software can not The process of
creating a mainframe SAS data set from a database flle
can be a time-consuming feat. Two methods for
converting a Fox.Pro for Windows database into a
format that a mainframe SAS program can read will be
compared.
the variables must be determined. Second, either the
variable names and column locations must be typed
into a SAS program, or a me displaying the database
structure must be edited and imported into a SAS
program. Not only do these tasks require time, but
there is a strong possibility of typographical errors.
Furthermore, the burden of these tasks is magnified
when working with a large number of variables.
A second method for exporting a FoxPro database that
a SAS program can read is to export the database as a
delimited ASCII file and design a SAS program that
uses list input to read the data. The delimited ASCII
me that FoxPro creates is a double-quoted,
comma-delimited me, and therefore, any double
quotes embedded in character data items must be
removed before the delimited file is created.
Additionally, all FoxPro field names must be valid
SAS variable names. To further reduce the chances of
typographical errors, import the database into
WordPerfect® and use the data merge option to obtain
the list of variables names that can be imported into a
SAS program.
CONCLUSION
METHODS
The process of creating a SAS data set from a FoxPro
database is a three step process. The first step is
exporting data to an ASCII file. The second step is
electronically transferring the ASCII me from the PC
to the mainframe using the communication software
available on your system. The third step is developing
a SAS program that can read the ASCII file. While the
second step is independent of the other two, the fust
and third steps are closely related since the SAS
program design is based on the format of the data.
One method for exporting a FoxPro database that a
SAS program can read is to export the database as an
SDF me and design a SAS program that uses column
input to read the data. First, the column location of all
260
Automating the process of creating a SAS data set to
the fullest extent possible improves accuracy and
reduces program development time. Furthermore, the
advantages of automation increase proportionally with
the number of variables in the database.
SAS, and SAS System for Personal Computers are registered 1rademarks
ofSAS Institute Incorporated in the USA and other countries.
FoxPro is a registered lrademark and Windows is a trademarl< of the
Microsoft COip01lllion in the USA and other countries.
WordPerfect is a registered trademarl< of the WordPerfect COip01lllion in
the USA and other countries.
For further information contact Monica Johnston at (5 I 0) 429-2500.