BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
behicks
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

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

View solution in original post

3 REPLIES 3
art297
Opal | Level 21

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

behicks
Calcite | Level 5

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.

Ksharp
Super User

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 676 views
  • 0 likes
  • 3 in conversation