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

Hi all--

I am doing the spreadsheet reformatting via tagsets.excelxpand proc Report. Everything was going fine until I started to get a weird error message. I have looked through all the documentation and I can’t find it. Does anyone know what this means? 

Thanks!

ERROR:  Read Access Violation In Task [ REPORT ]

Exception occurred at (4FD0788C)

Task Traceback

Address   Frame     (DBGHELP API Version 4.0 rev 5)

4FD0788C  0AC6DEA4  tkmk:tkBoot+0x6868

017ACCEB  0AC6DEB4  sashost:Main+0x16727

66FDD075  0AC6DED8  sasods:mcn_main+0xDC075

66FDACE4  0AC6E038  sasods:mcn_main+0xD9CE4

66FDF8E7  0AC6E5C8  sasods:mcn_main+0xDE8E7

58DAF291  0AC6E6A0  sasxml:mcn_main+0x1E291

08786C80  0AC6E7D4  sasrep7:mcn_main+0x5C80

0878CA96  0AC6E990  sasrep7:mcn_main+0xBA96

0878BE0A  0AC6EA00  sasrep7:mcn_main+0xAE0A

66F2B4E1  0AC6EB48  sasods:mcn_main+0x2A4E1

66F2A17D  0AC6EC6C  sasods:mcn_main+0x2917D

64C14CF7  0AC6FBA0  sasrepmn:mcn_main+0x3CF7

64BF1090  0AC6FF90  sasrepor:mcn_main+0x90

017A2854  0AC6FFA4  sashost:Main+0xC290

0188E038  0AC6FFB8  sashost:Main+0xF7A74

77E64829  0AC6FFEC  kernel32:GetModuleHandleA+0xDF

1 ACCEPTED SOLUTION

Accepted Solutions
12 REPLIES 12
art297
Opal | Level 21

The following may or may not apply: http://support.sas.com/kb/39/506.html

Mgarret
Obsidian | Level 7

Perfect, yes.  I think the ":" in my proc report, code is the problem (as the the description of the error message indicated) . I am trying to pull in a list of variables using the wildcard : and when i remove the variables in the columns statement that have : at the end, the program works. Thanks!

Cynthia_sas
SAS Super FREQ

This would be an scenario where you need to work with Tech Support. If the problem is a bad TAGATTR specification, then they can help you figure out what the right TAGATTR value should be.

cynthia

Mgarret
Obsidian | Level 7

I am writing a description of the problem to Tech Support now. Thanks! I think the ":" in my proc report, code is the problem (as the the description of the error message indicated) . I am trying to pull in a list of variables using the wildcard : and when i remove the variables in the columns statement that have : at the end, the program works.

Cynthia_sas
SAS Super FREQ

Hi:

  Since you didn't post your code, I don't know what you tried. I hope you didn't try this:

DEFINE var: / display;

and try to use the variable list in the DEFINE statement. I would NOT expect that to work. A DEFINE statement only references 1 report item.

  I tried using a varlist only in the COLUMN statement and didn't have an issue (see screenshot), even with a mix of numeric and character variables in the numbered variables in my list. So, it's probably a good thing that you're working with Tech Support.

cynthia

data testlist(keep=name rest:);

  set  sashelp.class;

  length rest1 8 rest2 $1 rest3 rest4 8;

  rest1 = age;

  rest2 = sex;

  rest3 = height;

  rest4 = weight;

run;

    

ods listing close;

ods tagsets.excelxp file='c:\temp\varlist.xls'

    style=sasweb;

  

proc report data=testlist nowd;

  column name rest:;

  define name / order;

  define rest1 / display;

  define rest2 / display;

  define rest3/ sum

         style(column)={tagattr="format:##0.00"};

  define rest4 /sum

         style(column)={tagattr="format:##0.0"};

run;

 

ods tagsets.excelxp close;


using_varlist_xp.jpg
data_null__
Jade | Level 19

Cynthia@sas wrote:

Hi:

  Since you didn't post your code, I don't know what you tried. I hope you didn't try this:

DEFINE var: / display;


Actually PROC REPORT is fine with a "SAS Variable List" in DEFINE and COLUMN statements and perhpaps other places too.  It is NOT fine with a list of variables in a DEFINE statement.  Sometimes using "SAS Variable Lists" like _ALL_ will cause the message

WARNING: Name is not in the report definition.

As _ALL_ refers to all variables in the input data set where the COLUMN statement may not include of those all variables.

12   proc report nowd list data=sashelp.class;

13      column sex age--weight name;

14      define _all_ / display;

15      define sex / order;

16      define Height--Weight / format=8.2;

17      run;

PROC REPORT DATA=SASHELP.CLASS LS=123 PS=63  SPLIT="/" CENTER ;

COLUMN  ( Sex Age Height Weight Name );

DEFINE  Sex / ORDER FORMAT= $1. WIDTH=1     SPACING=2   LEFT "Sex" ;

DEFINE  Age / DISPLAY FORMAT= BEST9. WIDTH=9     SPACING=2   RIGHT "Age" ;

DEFINE  Height / DISPLAY FORMAT= 8.2 WIDTH=8     SPACING=2   RIGHT "Height" ;

DEFINE  Weight / DISPLAY FORMAT= 8.2 WIDTH=8     SPACING=2   RIGHT "Weight" ;

DEFINE  Name / DISPLAY FORMAT= $8. WIDTH=8     SPACING=2   LEFT "Name" ;

RUN;

Cynthia_sas
SAS Super FREQ

Hi:

  Thanks for making me test my code. I should have tested before I posted. You are right. I stand corrected. (and all the more reason for the OP to work with Tech Support)

  The interesting thing is that with SAS 9.3, ALL of the code below (including _ALL_ and the double hyphen list) worked for me. What version of SAS did you use for your test?

cynthia


ods listing;
** make sure I know the order of variables;
** to use the double hyphen list;

** name is in pos1, with sex--weight in pos 2 through 5;


proc contents data=sashelp.class;
run;
 
ods listing close;

** use double hyphen;
ods tagsets.excelxp file='c:\temp\use_double_hyphen_list.xls'
    style=sasweb;
  
proc report data=sashelp.class nowd;
  column sex--weight name;
  define name / order;
  define sex--weight / display;
run;
 
ods tagsets.excelxp close;

** use colon;
ods tagsets.excelxp file='c:\temp\use_colon.xls'
    style=sasweb;
    
proc report data=testlist nowd;
  column name rest:;
  define name / order;
  define rest: / display;
run;
   
ods tagsets.excelxp close;
 
** use _all_;
ods tagsets.excelxp file='c:\temp\use_all.xls'
    style=sasweb;
    
proc report data=sashelp.class nowd;
  column  _all_;
  define _all_ / display;
run;
   
ods tagsets.excelxp close;

  

** use _character_ and _numeric_;
ods tagsets.excelxp file='c:\temp\use_char_num.xls'
    style=sasweb;
  
proc report data=sashelp.class nowd;
  column _character_ _numeric_;
  define _character_ / display;
  define _numeric_ / f=best8.2;
run;
 
ods tagsets.excelxp close;
 

data_null__
Jade | Level 19

Cynthia@sas wrote:

What version of SAS did you use for your test?

cynthia

NOTE: SAS (r) Proprietary Software 9.2 (TS2M0)


Cynthia_sas
SAS Super FREQ

Hmmm...curiouser and curiouser. And in the REPORT doc, it refers to the DEFINE statement as being used for a report-item (singular) and there's nothing in the doc about the ability to use the variable lists or referencing techniques. So, this is an instance where it seems like the colon technique,and some of the other techniques might work with SAS 9.3, at least and possibly 9.2, but they are probably not the cause of the READ ACCESS VIOLATION. So, we have now wandered far afield of the original question and issue. It'll be interesting to see what the problem really was/is.

cynthia

Tim_SAS
Barite | Level 11

Cynthia@sas wrote:

And in the REPORT doc, it refers to the DEFINE statement as being used for a report-item (singular) and there's nothing in the doc about the ability to use the variable lists or referencing techniques.

PROC REPORT will accept a variable name list as a report-item in a DEFINE statement, but curiously this has never been documented. Our documentation people assure me that this will be rectified in the next edition of the PROC REPORT documentation.

Cynthia_sas
SAS Super FREQ

Cool, Tim! Thanks for clarifying that!

cynthia

data_null__
Jade | Level 19

I've seen READ ACCESS VIOLATION from PROC REPORT many times.  Usually involving FLOW (don't use that much any more) or COMPUTE as I recall.  I usually just start factoring out bits until I find the point were it works again and then think about it some more.

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
  • 12 replies
  • 2719 views
  • 3 likes
  • 5 in conversation