Chapter Contents |
Previous |
Next |
Definition |
How to Read Column-Binary Data |
To read column-binary data with SAS, you need to know:
The following table lists and describes SAS column-binary informats.
Informat Name | Description | |
---|---|---|
$CBw. |
reads standard character data from column-binary files | |
CBw. |
reads standard numeric data from column-binary files | |
PUNCH.d |
reads whether a row is punched | |
ROWw.d |
reads a column-binary field down a card column |
To read column-binary data, you must set two options in the INFILE statement:
infile file-specification or path-name recfm=f lrecl=160;
Note: The expansion of each column of column-binary
data into two bytes does not affect the position of the column
pointer. You use the absolute column pointer control @, as usual, because
the informats automatically compute the true location on the doubled record.
If a value is in column 23, use the pointer control @23 to move the pointer
there.
Description of Column-Binary Data Storage |
In the zone portion of the punched card, which is the first three rows, the zone component of the pair can have the values 12, 11, 0 (or 10), or not punched. In the digit portion of the card, which is the fourth through the twelfth rows, the digit component of the pair can have the values 1 through 9, or not punched.
The following figure shows the multi-punch combinations corresponding to letters of the alphabet.
Columns and Rows in a Punched Card
SAS stores each column of column-binary data in two bytes. Since each column has only 12 positions and since 2 bytes contain 16 positions, the 4 extra positions within the bytes are located at the beginning of each byte. The following figure shows the correspondence between the rows of a punched card and the positions within 2 bytes that SAS uses to store them. SAS stores a punched position as a binary 1 bit and an unpunched position as a binary 0 bit.
Column-Binary Representation on a Punched Card
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.