column(1) str6 HHID %6s "HOUSEHOLD IDENTIFIER"  
column(7) str3 PN %3s "PERSON NUMBER"  
[additional dictionary statements]  
}
7B2. Linux: SAS  
In the following examples we assume that the user (user1) is working in a folder  
named saswork (/home/user1/saswork), and is creating a SAS version of HRS  
products in a separate sub-folders (e.g./home/user1/saswork/2022/sas).  
Building SAS system files (One Section)  
In the following example we assume that the user has downloaded the 2022 tracker  
dataset and placed the files in a folder called trk2022  
(/home/user1/saswork/trk2022) with the ASCII data file (.da) stored in subfolder  
data (/home/user1/saswork/trk2022) and the syntax file (.sas) in subfolder sas  
(/home/user1/saswork/trk2022/sas). Next step is to modify trk2022tr_r.sas to  
match the folder structure:  
In file trk2022tr_r.sas:  
Change from…  
LIBNAME trk2022 'c:\trk2022\sas\';  
DATA trk2022.trk2022tr_r;  
INFILE 'c:\trk2022\data\trk2022tr_r.da' LRECL = 1028;  
To…  
LIBNAME trk2022 '/home/user1/saswork/trk2022/sas/ ';  
DATA trk2022.trk2022tr_r;  
INFILE '/home/user1/saswork/trk2022/trk2022tr_r.da' LRECL = 1028;  
When the SAS file is run, it will create file trk2022tr_r.sas7bdat in folder  
/home/user1/saswork/trk2022/sas/.  
Building SAS system files (Multiple Sections)  
In the following example we assume that the user has downloaded the HRS 2022  
Core dataset and placed the files in a folder called hrs2022  
(/home/user1/saswork/hrs2022) with the ASCII data files (H22{sec}_{lvl}.da)  
stored in subfolder data (/home/user1/saswork/hrs2022/data) and the syntax files  
(H22{sec}_{lvl}.sas) in subfolder sas (/home/user1/saswork/hrs2022/sas).  
Important: Begin by modifying each syntax file as follows:  
Change all occurrences of...  
LIBNAME H2222 'c:\hrs2022\sas\';  
To...  
LIBNAME H2222 '/home/user1/saswork/hrs2022/sas/';  
Change the INFILE statement in each .sas file from...  
INFILE 'c:\hrs2022\data\H22{sec}_{lvl}.da' LRECL = nnn;  
To...  
INFILE '/home/user1/saswork/hrs2022/data/H22{sec}_{lvl}.da' LRECL=nnn;  
Example  
INFILE '/home/user1/saswork/hrs2022/data/H22A_H.da' LRECL=87;  
13  
February 2024, Version 1.0