Your SAS programs, embedded in web apps and elsewhere

Calling a SAS program from an Icon on a SAS/AF application

Reply
N/A
Posts: 0

Calling a SAS program from an Icon on a SAS/AF application

I am trying to figure out a way to call and display a saved base SAS program in the program editor from an icon on an AF frame. Is there a way similar to how you can call an fsedit screen with CALL FSEDIT?
Thanks!
SAS Super FREQ
Posts: 306

Re: Calling a SAS program from an Icon on a SAS/AF application

Posted in reply to deleted_user
Your question is off-topic for this forum, but ... will this do what you want?
[pre]
submit continue;
dm 'pgm; include c:\MyFolder\MyProgram.sas' pgm;
endsubmit;
[/pre]
Vince DelGobbo
SAS R&D
Super User
Posts: 3,260

Re: Calling a SAS program from an Icon on a SAS/AF application

Posted in reply to Vince_SAS
There is the PREVIEW function that can include an external SAS program. Check the online help for the full details, but you will need to do something like this in your SCL:

rc = filename(fref,'c:\MyFolder\MyProgram.sas');
rc = preview('include', fref);

Then a submit continue step will execute the program:

submit continue;
endsubmit;

PREVIEW also allows you to view the program prior to running it which can be useful.
Ask a Question
Discussion stats
  • 2 replies
  • 201 views
  • 0 likes
  • 3 in conversation