I am new with SAS and have two problems that I need help with. (Problem 1 is solved just problem 2 left)
1.) The OBS column only prints out number corresponding to the record number the observations are found.
Example:
Obs
311
331
352
I would like to have a column that prints out number starting from 1
Obs
1
2
3
2.) Because I have so many columns, when I print out the report or do a print preview, some columns on the right hand side gets cut off like the date would get chopped off. Because I have so many columns I was wondering how to adjust the page when I print the report so nothing would get cut off.
This is the code:
proc print data=check_nodup;
TITLE2 'Check MDOB across all booklets and tables';
var id DOB_randtime DOB_sal DOB_pat DOB_patdat DOB_en2 DOB_en3 DOB_en4 DOB_cont2 DOB_DOB_cont3
DOB_DOB_cont4 DOB_DOB_cont5 DOB_DOB_cont6 DOB_DOB_cont7 DOB_DOB_cont8 DOB_del2 DOB_del3
DOB_mat2 DOB_mat3 DOB_mat4 DOB_mat5 DOB_mat6 DOB_mat7 DOB_neo2 DOB_neo3 DOB_neo4 DOB_neo5 DOB_neo6
DOB_neo7 DOB_supdoc DOB_ques2 DOB_ques3 DOB_ques4 DOB_ques5 DOB_DOB_ques6 DOB_ques7 DOB_ques8;
where all_match=0;
run;
1.) The OBS column only prints out number corresponding to the record number the observations are found.
Example:
Obs
311
331
352
I would like to have a column that prints out number starting from 1
Obs
1
2
3
2.) Because I have so many columns, when I print out the report or do a print preview, some columns on the right hand side gets cut off like the date would get chopped off. Because I have so many columns I was wondering how to adjust the page when I print the report so nothing would get cut off.
This is the code:
proc print data=check_nodup;
TITLE2 'Check MDOB across all booklets and tables';
var id DOB_randtime DOB_sal DOB_pat DOB_patdat DOB_en2 DOB_en3 DOB_en4 DOB_cont2 DOB_DOB_cont3
DOB_DOB_cont4 DOB_DOB_cont5 DOB_DOB_cont6 DOB_DOB_cont7 DOB_DOB_cont8 DOB_del2 DOB_del3
DOB_mat2 DOB_mat3 DOB_mat4 DOB_mat5 DOB_mat6 DOB_mat7 DOB_neo2 DOB_neo3 DOB_neo4 DOB_neo5 DOB_neo6
DOB_neo7 DOB_supdoc DOB_ques2 DOB_ques3 DOB_ques4 DOB_ques5 DOB_DOB_ques6 DOB_ques7 DOB_ques8;
where all_match=0;
run;
Last edited: