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

 

Setup:  I have a very long program that puts 83 files in my temp library.  There are three proc report macros that produce an .xml output file with three tabs.

Problem:  When I run my program the first time, one of my proc report .xml output tabs doesn't display, but i get no errors. The second time I run it, it displays.  If I shut down and restart, the same thing happens. Does that means my third proc report program is calling on the dataset before it's created or does it have something to do with this warning that I only get on the first run: WARNING: A GROUPORDER, or ACROSS variable is missing on every observation

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Sounds like the logic of your macro is messed up. Most likely with the timing of the generation of macro variables.

One likely issue is you might be referencing a macro variable in a data step before the macro variable has been created and this is causing you to generate missing values. Then on the second pass it works because you created the macro variable on the first pass.

 

Or perhaps a missing RUN or QUIT statement so that global statements like TITLE or ODS get applied to the wrong step?

 

View solution in original post

4 REPLIES 4
Reeza
Super User

I wouldn't trust the results from the second run then. 

 

Look at your log and see where it's error occurs. 

 

Use the following options to get information in your log:

 

options mprint symbolgen mlogic;
LuAnnS
Fluorite | Level 6

Thank you.  I have those settings already.  I can see where it occurs.  The warning occurs on the first run only, in the log section of the tab that is displaying no data.  I checked the order order= settings on my other proc report sections and I don't see a difference.    I don't clear my ods tagsets (ods Tagsets.ExcelXP close;) at the end of proc reports so maybe it's being called later and is still in effect for the second run?

Reeza
Super User

@LuAnnS wrote:

Thank you.  I have those settings already.  I can see where it occurs.  


Ok, we can't see any of those though, so sure your logic is wrong somewhere. 

 

If you don't have ODS <destination> CLOSE the file won't be created, but the second run shouldn't impact that unless you have a CLOSE earlier. 

 

 

Tom
Super User Tom
Super User

Sounds like the logic of your macro is messed up. Most likely with the timing of the generation of macro variables.

One likely issue is you might be referencing a macro variable in a data step before the macro variable has been created and this is causing you to generate missing values. Then on the second pass it works because you created the macro variable on the first pass.

 

Or perhaps a missing RUN or QUIT statement so that global statements like TITLE or ODS get applied to the wrong step?

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 3397 views
  • 0 likes
  • 3 in conversation