BookmarkSubscribeRSS Feed
dishant
Calcite | Level 5


Hi All,

AsI am using SAS DM Staement to save the SAS code In SAS 9.4, the automatically SAS editior window is opening.

The question is how we can control that?

Below are the example of DM statement.

to save the code :

dm wedit 'file "C:\Users\DParikh\Desktop\test.sas"';

If I am running this code its save the code but in SAS it's opening another editior window, how we can control it.

Thanks in advance.

Regards,

Dishant

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

Could you clarify what you are doing, with some examples.  Why would you want to have code to save your code at run-time, just control+s.  If you are trying to include code then use the %include syntax.

dishant
Calcite | Level 5

RW9,

I want save my code on same share location, Which is a server location, that server location I cant save with just control+s. I need to pass the path, hence I am doing with DM statemnet.

Regards,

Dishant

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Sorry, I still don't understand.  The DM statement has no specific tricks to do something that the Save or Save As functions would give you.  Are you saying that you do not have a network drive mapped, then that would be the root of the issue.  So, if I have a code file ope in Enhanced Editor, I goto File->Save (as) then post your network path into the filename box, and it should goto that area.  Then type you file in.

Alternatively get a network path mapped to a drive letter.

dishant
Calcite | Level 5

Sorry for bad Explanation above.

My Code, I want to save code on Share Point (Server).

I can't specify that location in the option of control+s.

Therefore, I need to use DM satement to save the code with passing the Share Point (server) location.

Hence its working fine, moreover while runing DM statement, Next Editior window (Editioe untitle2) is opening.

So my question is how to control  it?(How to aviod to open the another editior window?)

Hope you will understand now.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

TBH I wouldn't recommend storing source code on a document management system in any situation.  If you are after version control, then for free there is (Tortoise)SVN and GIT, plus SAS have a solution etc.

If you do need to connect to SharePoint, then that is simple, its just a network path much like any other, I have a few SharePoint areas mapped to network drives so I can read documents directly from them.  You may need to check with your IT what the exact path/admin items are, e.g. for me, I goto SharePoint and in the URL bar, I can copy the text, drop the http:, and any information after the path and then use that as the connection, user information is supplied behind the scenes.

As I mentioned before I wouldn't recommend saving code via code - what happens if something goes wrong for instance?

As to your question of how to avoid it opening another editor window, you are using the wedit command which is inbuilt into SAS to open a new window, I don't think you will get round that.

jakarman
Barite | Level 11

Check how to connect to sharepoint first.
As it not an direct editor option  it could get to some function when you are getting a filename access working.  Walk before you run.

https://communities.sas.com/message/225656

---->-- ja karman --<-----

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 6 replies
  • 1335 views
  • 0 likes
  • 3 in conversation