

We’re going to use the General Social Survey (GSS) for this exercise. Part I – Linear Regression with Multiple Independent Variables The exercise also gives you practice using LINEAR REGRESSION, FREQUENCIES, and SELECT CASES in PSPP. The goal of this exercise is to introduce multiple linear regression.
#Pspp data list lrecl mod
Proc transpose data=&dsn (obs=0) out=names įile "C:\TRY\&out_rpt.txt" lrecl=32767 dlm='|' dsd įile "C:\TRY\&out_rpt.txt" lrecl=32767 dlm='|' dsd MOD Really not much penalty for setting it too large as SAS will only write the number of characters it needs. 32K is reasonable default, but the FILE statement will support 1000000 or larger depending on your hardware. Better to set it larger than you really need. Note that 300 seems like an pretty short length to set for your LRECL for outputting an unknown number of variables. Note that your list of variable names could even use SAS variable list features like VAR3-VAR5 as shorthand for VAR3 VAR4 VAR5. It is easy to use PROC TRANSPOSE to generate a dataset with one record per variable name. Why not let SAS write the variable names instead of putting them into a string? Then you don't need to worry that it might be longer than 262 characters. You can get PROC EXPORT to write the main file and just add the footer.īut that can be tricky if you wnat the variables in a different order than they exist in the dataset. Thanks in advance to whoever that willing to help
#Pspp data list lrecl code
You might have unbalanced quotationġ)After I already specify LRECL = 300, why does the warning appear?Ģ) The output from above code shows that, there is extra pipeline after total obs. WARNING: The quoted string currently being processed has become more than 262 characters long. The output does not match with my expectation.įile "C:\TRY\&out_rpt.txt" lrecl = 300 dlm = '|'

I am trying to produce output into textfile with pipeline delimeter.
