BookmarkSubscribeRSS Feed
MartinBoland
Fluorite | Level 6

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

 

1 REPLY 1
SASJedi
SAS Super FREQ

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

Check out my Jedi SAS Tricks for SAS Users

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
  • 1 reply
  • 451 views
  • 1 like
  • 2 in conversation