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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1165 views
  • 0 likes
  • 3 in conversation