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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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