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,
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.
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?
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;
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.
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.
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 😊
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.
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.
Ready to level-up your skills? Choose your own adventure.