
Some files in IRSS's Data Archive are binary copies of files originally written on older IBM mainframe systems running the MVS operating system in a form known as "variable length, blocked records" or RECFM=VB files. Such files have names ending in ".vb" in the Data Archive. Because of their special format, these files cannot be read by most statistical software on UNIX, Windows or Macintosh systems. However, they can be read by SAS® using some specialized code on any of these platforms.
You must do a binary download of the file to your computing platform using FTP prior to
attempting to read it with SAS.
Two SAS data step statements require special modifications in order to read .vb files -- the INFILE and INPUT statements.
| Input Format Name | Used for Reading | Yields SAS Variable Type |
| $EBCDICw. | Character Fields | Character |
| S370FFw. | Numeric Character Field | Numeric |
| S370FIBw. | IBM/MVS Integer Binary Field | Numeric |
| S370FPDw. | IBM/MVS Packed Decimal Field | Numeric |
| S370FZDw. | IBM/MVS Zoned Decimal Field | Numeric |
DATA billing ;
INFILE "~/phybill.data.vb" RECFM=S370VB LRECL=32768 ;
INPUT @1 RIC $EBCDIC1. REFYEAR S370FF2. BASEID $EBCDIC8.
VERSION $EBCDIC1. (HPROCDT FROMDT THRUDT) ($EBCDIC6.)
CWFLOC $EBCDIC1. ACCRDT $EBCDIC6. ACCRNO S370FPD2. DISPCD $EBCDIC2. ;
As you can see there are a lot of character variables read with the $EBCDICw. input
format. The second variable (REFYEAR) is read as a two digit number with the S370FF2.
fomat. Also, one variable (ACCRNO) is read with the packed decimal (S370FPD2.) format.
It is necessary to read the documentation supplied with these files very carefully to
determine what format is needed to read a particular data field.