08-27-2014 05:42 AM
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.
08-27-2014 06:03 AM
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.
08-27-2014 06:53 AM
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.
08-27-2014 06:59 AM
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.
08-27-2014 07:19 AM
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.
08-27-2014 08:07 AM
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.
08-27-2014 08:07 AM
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.