turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Proc DSTrans example.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-15-2016 11:40 PM

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.

Accepted Solutions

Solution

02-16-2016
01:12 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-16-2016 09:54 AM

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-16-2016 12:38 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-16-2016 09:44 AM

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

Solution

02-16-2016
01:12 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-16-2016 09:54 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-16-2016 01:13 PM

Thanks Chris. That makes sense.