BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
smijosimon
Calcite | Level 5

Hi,

 

while reading on Proc DS2, i came across a comment
which said PROC DSTRANS will help you by translating a subset of your DATA step code into DS2 code.
However i am not able to find a good documentation on this procedure.  some have put the code but not the result or log.
i use the same code and it does not work for me .. 

Could someone please guide me on this ... DS2 seems very promising.  (Fyi I am using sas 9.4 on Eg 7.1 in noprofile mode) 


so I created a dummy code like 

 

data side_L;
	SET Sashelp.geoexs;
		where side='L';
run;


data side_R;
	SET Sashelp.geoexs;
		where side='R';
run;

saved the code and then tried proc dstrans as follows 

 

PROC DSTRANS DS_TO_DS2  
	IN='F:\sas\sas statistic practise dsn/ds2_proc_dstrans.sas'
	OUTdir='F:\sas\sas statistic practise dsn/' 
	out='ds2_proc_dstrans_Converted.sas'  ;
RUN;
quit;

 

 

 

Here is the log - 

 

 

23         PROC DSTRANS DS_TO_DS2
24         IN='F:\sas\sas statistic practise dsn/ds2_proc_dstrans.sas'
25         OUTdir='F:\sas\sas statistic practise dsn/'
26         out='ds2_proc_dstrans_Converted.sas'  ;
27         RUN;

3          data side_L;
           ____
           180
4          	SET Sashelp.geoexs;
            ___
            180
5          		where side='L';
             _____
             180
9          data side_R;
           ____
           180
ERROR: Could not compile source code.
10         	SET Sashelp.geoexs;
            ___
            180
11         		where side='R';
             _____
             180
ERROR 180-322: Statement is not valid or it is used out of proper order.
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

DSTRANS is used mainly by SAS solutions, such as SAS Decision Services, to convert DATA step to DS2 or C.  There are some references to it being documented as part of the DS2 Language Reference, but I don't see it there.  At best, I'd say this isn't a highly-documented procedure as it was designed to facilitate SAS-provided solutions -- pushing DATA step work into databases or creating parallelized data flows.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

4 REPLIES 4
Reeza
Super User

Can you post references to PROC DSTRANS?

I can't find anything either, except a random comment in someone's blog.

That type of code translation seems a bit too good to be true to me 🙂

smijosimon
Calcite | Level 5

 

Here is the description that comes up on  SAS EG. However on clicking the product documentation links results in "no results found"
and some links say its explained in the "DS2 language reference guide", however i do not find any mention of it there too.

makes me wonder if it was an internal training procedure 😄

 

 

dstrans.png

 

 

dstrans2.PNG

ChrisHemedinger
Community Manager

DSTRANS is used mainly by SAS solutions, such as SAS Decision Services, to convert DATA step to DS2 or C.  There are some references to it being documented as part of the DS2 Language Reference, but I don't see it there.  At best, I'd say this isn't a highly-documented procedure as it was designed to facilitate SAS-provided solutions -- pushing DATA step work into databases or creating parallelized data flows.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
smijosimon
Calcite | Level 5
Thanks Chris. That makes sense.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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