BookmarkSubscribeRSS Feed
JacquesR
Quartz | Level 8

Hi all

 

I use UltraEdit for the bulk of my coding. Are there any other UltraEdit & SAS users out there who might be able to help with (or benefit from) this?

I have "heard rumours" that it might be possible to send the program through to SAS from within UltraEdit.

See, for example, this post from a SAS staffer (a decade old, unfortunately).

https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/sas.html

I also see some attempts in the SAS forums, but none with satisfactory solutions:

https://communities.sas.com/t5/SAS-Programming/Ultraedit-to-run-SAS-programs/m-p/281497

https://communities.sas.com/t5/SAS-Programming/How-to-setup-notepad-or-ultra-edit-to-run-the-SAS-cod...

 

I tried getting that original tutorial to work, but keep running into problems. The first was spaces in the file path, which I partly resolved, but not completely.

I also tried posting on the UltraEdit forums, but so far with no success.

http://forums.ultraedit.com/viewtopic.php?p=65115

The important part of the *.bat file now looks like this:

%EXESAS% ^
-CONFIG %CONFIGSAS% ^
-autoexec %AUTOEXECSAS% ^
-sysin ('type %1') ^

-log ('type %2') –nodms

 

It seems as if the *.sas program file is now fed through correctly to SAS, but still not the log file.

See the Command window output below:
C:\Users\...\OneDrive - The University ...\...\Develop Run and Debug your SAS Programs in UltraEdit_files>
"c:\Program Files\SASHome\SASFoundation\9.4\sas.exe"  
-CONFIG "c:\Program Files\SASHome\SASFoundation\9.4\sasv9.cfg"  
-autoexec "c:\Users\...\OneDrive - The University ...\...\Develop Run and Debug your SAS Programs in UltraEdit_files\autoexec.sas"  
-sysin ('type C:\Users\...\OneDrive" - The University ...\!USyd Projects\Google "Trends\Data_management\Cov\test.sas') 
-log ('type C:\Users\...\OneDrive') ûnodms

 

And there is a problem with the nodms option. This is what I get in SAS:


ERROR: Unrecognized SAS option name ÛNODMS.
ERROR: (SASXKRIN): KERNEL RESOURCE INITIALIZATION FAILED.
ERROR: Unable to initialize the SAS kernel.

Any ideas about how to send through the nodms SAS option?

 

Thanks

 

3 REPLIES 3
japelin
Rhodochrosite | Level 12

From the path, I think your environment is Windows, is that correct?
If it is Windows, I think nodms was disabled, so try to run it without the option.


First, check SAS startup by specifying only -config.
Next, add -sysin to check the operation of batch execution
Next, add -autoexec and check the operation.
Next, add -log to check the output log .
I think it is a shortcut to add and verify options one by one like this

 

Kurt_Bremser
Super User

Your hyphen is not a hyphen, but a UTF character that looks like one. Always avoid any kind of word processor when writing code, only use a text editor, and be very careful when copy/pasting code from places where a word processor or some kind of web editor might be involved.

These are your character, followed by a true hyphen:

– -

When looking carefully, you see the size difference.

Or run this code (the "hyphen" was copy/pasted from your code):

data _null_;
string = "–";
checkstring = put(string,$hex6.);
put string= checkstring=;
run;
AllanBowe
Barite | Level 11

We'll be adding this functionality to the SASjs VS Code extension soon.  We have Viya support already, SAS 9 (metadata) should be a week or so, and Desktop SAS will be in 3-4 weeks.

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 3 replies
  • 988 views
  • 1 like
  • 4 in conversation