I am very new to SAS and cannot seem to figure out a way around my problem.
PROC REPORT DATA=FILE1 NOWD LS=140;
DEFINE REITFLAG / GROUP WIDTH=8;
....
i removed some defines here.
....
COLUMN BANK REITFLAG ACCT ACCTST PROCST PROD ACCTTYP
PROCTYP MATDATE EFFDATE COLLCD BAL COFFBAL STATE MLSTATE;
BREAK AFTER REITFLAG / PAGE SUMMARIZE;
COMPUTE AFTER;
LINE 'TOTAL BALANCE: '
BAL.SUM DOLLAR14.2;
LINE 'TOTAL CHARGEOFF: '
COFFBAL.SUM DOLLAR14.2;
ENDCOMP;
TITLE 'XXXXXXXXXXXX';
TITLE2 "XXXXXXXXX";
RUN;
My issue is the REITFLAG won't print on each row of data. It only prints on the first row and then on the summary row. How can I force it to print on all rows?
XXXXXXXXXXXXX
XXXXXXXXX
BANK REITFLAG ACCOUNT NUMBER ACCTST PROCST PROD ACCTTYP PROCTYP MATDATE EFFDATE COLLCD BALANCE COFF BAL STATE MLSTATE
001 0001 00000XXXXXXXXX AC AAAA 120 01 20231125 19831122 RES 28703.32 0 OH IN
001 0000XXXXXXXXXX AC AAAA 210 03 20130130 20061209 AUT 7870.42 0 VA IN
070 0000XXXXXXXXXX AC CF AAAA 210 03 20031119 19980507 AUT 0 6972.23 OH IN
0001 36573.74 6972.23
XXXXXXXXXXXXX
XXXXXXXXX
BANK REITFLAG ACCOUNT NUMBER ACCTST PROCST PROD ACCTTYP PROCTYP MATDATE EFFDATE COLLCD BALANCE COFF BAL STATE MLSTATE
001 0002 00000XXXXXXXXX AC CF AAAA 111 00 20151013 20000928 RE3 0 30612.51 OH IN
001 00000XXXXXXXXX AC AAAA 111 01 20201025 20001004 RE3 6577.23 0 OH IN
...
...
Any help to print the REITFLAG on each line would be appreciated.
Brian
I think you can get around that behavior using compute blocks. Take a look at:
http://www.sascommunity.org/wiki/Repeating_Group_variable_values_in_PROC_REPORT
I think you can get around that behavior using compute blocks. Take a look at:
http://www.sascommunity.org/wiki/Repeating_Group_variable_values_in_PROC_REPORT
I added...
COMPUTE BEFORE REITFLAG;
HOLD_REITFLAG = REITFLAG;
ENDCOMP;
COMPUTE REITFLAG;
IF _BREAK_ = ' ' THEN
REITFLAG = HOLD_REITFLAG;
ENDCOMP;
Just after the define of the REITFLAG and it works perfect. Thanks art297. I spent 8 hours trying to figure this out and fixed it in 30 minutes after seeing your reply.
Much appreciated.
What usage for REITFLAG variable. I doubt it is defalut usage(i.e. analysis).
You should change it into display.
define REITFLAG / display .........
Which will give you detail report.
Ksharp
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.