How to open a SAS program in Unix from command prompt (and not run program in batch)

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

How to open a SAS program in Unix from command prompt (and not run program in batch)

Is there a way to open a SAS program in Unix (from the command prompt) that does not run the SAS program in batch-mode?

Typing "sas" will open the GUI, run the autoexec.sas, and create a new blank SAS program.

How can I call SAS that it will just open the file, but not actually run it until I select "Run" -> "Submit"?

Thanks for you time and thoughts. Haven't been able to find any documentation about this.


Accepted Solutions
Solution
‎08-21-2014 12:22 PM
Super User
Super User
Posts: 6,851

Re: How to open a SAS program in Unix from command prompt (and not run program in batch)

You could use the -INITSTMT (or -IS) option.

sas92 -is 'dm "include test.sas";' &

View solution in original post


All Replies
Trusted Advisor
Posts: 3,208

Re: How to open a SAS program in Unix from command prompt (and not run program in batch)

If you have an x11 server installed on your desktop and are allowed to make a connection from unix to your X11 (desktop server). Than:  
......     Typing "sas" will open the GUI, run the autoexec.sas, and create a new blank SAS program.

You have to open the program in your Editor as usual.     What is your problem? 

---->-- ja karman --<-----
New Contributor
Posts: 3

Re: How to open a SAS program in Unix from command prompt (and not run program in batch)

I want to be able to open the SAS program from the command line. The idea is that this would be built into a script.

Opening the GUI and then clicking "File" - > "Open" would not be ideal as there are hundreds of programs spread throughout hundreds of directories.

Thanks, Japp.

Trusted Advisor
Posts: 3,208

Re: How to open a SAS program in Unix from command prompt (and not run program in batch)

If you can start a program containing the DM statement you can instruct that to open a file. It automates the DM interface. IT only works with the dms interface not with Eguide portal Studio or any other. SAS(R) 9.4 Statements: Reference, Third Edition

When you can start your session with an instruction to that, it is achievable. I am thinking on an autoexec that contains a check with parameters as given eg with the sysparm option SAS(R) 9.4 Macro Language: Reference, Second Edition    

---->-- ja karman --<-----
SAS Employee
Posts: 1

Re: How to open a SAS program in Unix from command prompt (and not run program in batch)

I believe your question was answered here:

Solution
‎08-21-2014 12:22 PM
Super User
Super User
Posts: 6,851

Re: How to open a SAS program in Unix from command prompt (and not run program in batch)

You could use the -INITSTMT (or -IS) option.

sas92 -is 'dm "include test.sas";' &

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 667 views
  • 6 likes
  • 4 in conversation