Hi,
I have successfully run a 'proc dstrans' to convert data step code to DS2. The only query I have is there are some lines of code which start with a hash (#).
e.g.
#_local _P1;
Is this a comment? It doesn't seem to do anything so I am assuming it is a comment. Can't find it in DS2 doco though.
Thanks,
Martin
PROC DSTRANS is undocumented because it is only intended for back-end use by other SAS procedures in very specific cases. In SAS 9.4 M6, PROC DSTODS2 is a documented procedure designed to help SAS users translate DATA step code to DS2. I wrote a blog post about this a while back.
One limitation is that both the original program file and the output file must reside in the current SAS default directory. In some client-server deployments, you won't have write permission to the SAS default directory. You can work around this by using the base SAS DLGCDIR function to set the default directory to a location where you do have write access. For example, if you were working in SAS on a Windows server and have write access to the c:\temp directory, you would save your DATA step program to C:\temp, then run code like this to make the translation:
%put %qsysfunc(dlgcdir(c:\temp));
PROC DSTODS2 IN="datastep.sas"
OUT="ds2program.sas";
RUN;
Hope this helps.
Mark
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.