BookmarkSubscribeRSS Feed
data_null__
Jade | Level 19

 

I can open a SAS program from the windows file explorer by right clicking and selecting open in EG 

data_null___1-1695067786550.png

I will get this, where the program in the process flow has the program name.

data_null___0-1695067573710.png

I want to emulate this behavior in a VBS program.  Something like Chris does here
https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/BatchProject.vbs

 

I can modify BatchProject.vbs example to copy a file and load it using code.text.  

strSASfile = ".....\example.sas"

Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strSASFile, ForReading)
strContents = objFile.ReadAll
objFile.Close

But I need to associate the program path.

I want the program (however it gets there) to have the name as it does when I open with right click.  So that when I submit _SASPROGRAMFILE will have the program path name.

 

%LET _SASPROGRAMFILE='<path-to-file>\example.sas';

I have very little experience with object oriented programing and I can't figure the syntax. I have this document 

Assembly:  SASEGScripting (in SASEGScripting.dll) Version: 4.2.0.0 (4.2.0.0)

but I don't know what I'm looking for.

 

 

 

I'm new to EG other than the most basic Open with EG and hit RUN.

 

 

 

 

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!
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
  • 0 replies
  • 325 views
  • 0 likes
  • 1 in conversation