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

Context:

I have a SAS EG program, which i use to load data to our SAS VA server, and send an email to notify users that data is being loaded and an email once the load has completed.

 

As part of this program the user needs to select what dataset they are wanting to load.

 

EG:

Unformatted Value    Formatted Value

File1                          Customer Data

File2                          Sales Data

 

Problem:

When i reference the prompt name (input_file) in the code it returns the unformatted value. 

 

Is there a way to have the program pull the formatted value from the prompt list, without having to actually code it specifically into the program?

 

 

Example code:

 

 

FILENAME Mailbox EMAIL;
DATA _NULL_;
FILE Mailbox 
TO= (emails here)
FROM= "&uemail"
SUBJECT="SAS VA Reports referencing &input_file table currently unavailable";
PUT "Hello All,";
PUT "Please be advised that table &input_file is currently being loaded to SAS VA (Discovery) by user &_metauser.";
PUT "This message is auto-generated.";
RUN;

Thanks in Advance,

Samuel

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

Is the list dynamic oder static? Is the formatted value generated by applying a format to the unformatted value?

For dynamic lists adding a variable with the formatted value to the data source seems to be the only possibility to solve the problem.

View solution in original post

2 REPLIES 2
andreas_lds
Jade | Level 19

Is the list dynamic oder static? Is the formatted value generated by applying a format to the unformatted value?

For dynamic lists adding a variable with the formatted value to the data source seems to be the only possibility to solve the problem.

SamuelD
Fluorite | Level 6
Hi Andreas_Ids, Yes this may be what i need to do, I guess i was hoping SAS had something built into EG, afterall when you use the prompt creator it lets you key two different values.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 1321 views
  • 2 likes
  • 2 in conversation