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

Hi,

I'm using a dattrmap dataset to set line colors in SGPLOT. When I run the program interactively, everything works fine, but when I run it in batch mode, I get the warning 'Invalid attrid "POOL" specified' and the color is not changed according to the value of POOL. Can anyone help? I need to run it in batch mode.

Host information: X64_10PRO WIN 10.0.19041 Workstation.

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Here's another way to help us diagnose the issue:

Put a PROC PRINT of the attrmap data set right after the data step and run it both interactively and in batch. This will help tell if the data is generated correctly in both situations.

View solution in original post

5 REPLIES 5
DanH_sas
SAS Super FREQ

Without seeing your code, my guess would be that there is an issue in your data step specification for the image map. Can you post any of your code?

SusanneWB
Fluorite | Level 6

This is the code I use to make the attribute map:

 

data attrmap;
length linecolor $ 10 markercolor $ 10;
input id $ value linecolor markercolor;
datalines;
pool 1 red red
pool 2 blue blue
;
run;

GraphGuy
Meteorite | Level 14

Can you show the SAS log?

In the text file containing the SAS code you run in batch on Unix, are there any leading spaces? Does the file have any DOS cr/lf at the end of the lines?

Try adding a proc print of the dataset after creating it, so you can verify it contains what you think it contains.

 

DanH_sas
SAS Super FREQ

Here's another way to help us diagnose the issue:

Put a PROC PRINT of the attrmap data set right after the data step and run it both interactively and in batch. This will help tell if the data is generated correctly in both situations.

SusanneWB
Fluorite | Level 6

Thanks, that solved it!

I could see there were leading spaces in the dataset from the batch run. I got rid of them, and now it works 😊

sas-innovate-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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