BookmarkSubscribeRSS Feed
webminer
Fluorite | Level 6
Hi,

I have a stored process presented to it's users via the portal (IDP). One of the prompts is for a SAS/Connect userid (which is generally the same as the users portal login and therefore available via the _USERNAME reserved macro variable in the STP server on execution.)

Is there any way to assign an initial value to a text prompt in a stored process using the _USERNAME macro var? (or any macro var?) I've tried using a %let to assign the prompt macro var the value of _USERNAME as well as &_USERNAME in the default value of the prompt properties to no avail.

I could create a dataset in metadata with one var/one row and use that to populate a default value at the beginning of the stored process but that seems over-complicated to me.

Any suggestions/comments appreciated.

Thanks,
Graham.
4 REPLIES 4
Vince_SAS
Rhodochrosite | Level 12
Is this for SAS 9.1 or SAS 9.2?

Vince DelGobbo
SAS R&D
Vince_SAS
Rhodochrosite | Level 12
I tried to do this using a dynamic prompt, but was unable to get it to work.

Another possible solution is to build a prompt page yourself, but note that this will only work if the stored process is executed using the SAS Information Delivery Portal or the SAS Stored Process Web Application.

The technique involves executing a stored process that writes the HTML-based prompt to _WEBOUT. Below is a snippet of code to get you started.

[pre]
data _null_;
file _webout;
put '
';
put '';
put 'Enter your SAS/CONNECT userid:';
put '';
put '<br>';
put '';
put '
';
run;
[/pre]

Vince DelGobbo
SAS R&D
webminer
Fluorite | Level 6
Thanks for your help, Vince. I was kind of hoping that you'd tell me that there was some kind of trick to force it to be recognised .... Never mind. Perhaps this could get added to the developers' New Year 'To Do List' ?! 🙂

Thanks for the snippet of code to get started down the other path, though.

All the best for the holiday season and a good New Year when it comes,

Graham.

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!

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
  • 4 replies
  • 1115 views
  • 0 likes
  • 2 in conversation