BookmarkSubscribeRSS Feed
rajuganesh30
Calcite | Level 5

Hello Everyone,

 

i want to embed a SAS prompt in a program that will be executed using SAS EG.

if the prompt is embedded in the program, anyone who will try to run the program can be able to give the prompt and use them(which is not defined in a project).

 

Can you please help me on this?

 

Kind Regards,

Raju G

3 REPLIES 3
jimbarbour
Meteorite | Level 14

As far as I know, this is not possible with just a regular .sas program.  Prompts are defined at the project level, not at the program level.  You may be able to set this up as a stored process if your shop uses stored processes.

 

Jim

AllanBowe
Barite | Level 11

Stored Processes are definitely the way to go - your code will be safer (harder for end users to modify) and you have complete flexibility through HTML / JavaScript / CSS how your prompts should look and behave.  

To create Stored Processes using SAS code, you can leverage this macro:  https://core.sasjs.io/mm__createstp_8sas.html

The equivalent for Viya is here:  https://core.sasjs.io/mv__createjob_8sas.html

 

A much tidier, and more git-centric way to build services in this way would be to use the SASjs CLI.  This will also help you to seperate the frontend from the backend.  Some useful links:

 

 

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
Sajid01
Meteorite | Level 14

Hello @rajuganesh30 
If you save the program as an EGP project yes. The code and prompt will be apart of the EGP

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 792 views
  • 0 likes
  • 4 in conversation