Reading and Writing Binary Data in UNIX Environments


Different computers store numeric binary data in different forms. For more information about compatible machine types, see "Accessing SAS Files across Compatible Machine Types in UNIX Environments" on page 108. If you try to move binary data in flat files across systems that are incompatible, problems will occur. A safer way to move data is by using SAS data sets.

SAS provides several sets of informats and formats for handling binary data. Some of these informats and formats are host dependent. For example, the IB w.d ,PD w.d , PIB w.d , and RB w.d . informats and formats read and write data in native mode. That is, they use the byte-ordering system that is standard for the machine. If you create a file using the IB w.d format on a 64-bit HP-UX host and then use the IB w.d informat to read the same file on a 32-bit Linux host, you will get unpredictable results.

For more information about all of the informats and formats, refer to SAS Language Reference: Dictionary .




SAS 9.1 Companion for UNIX Environments
SAS 9.1 Companion For Unix Enivronments
ISBN: 1590472101
EAN: 2147483647
Year: 2004
Pages: 185
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net