BookmarkSubscribeRSS Feed
DeepakSwain
Pyrite | Level 9

Hi there,

I am trying to create data step program by reading an existing table. Apart from DATA to DATA Step Macro by Jedi, is there any way to address the need. 

 

Thank you in advance for your kind reply.

 

Regards,

 

 
Swain
6 REPLIES 6
ballardw
Super User

Don't know about jedi.

 

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

Reeza
Super User

This code is originally from Mark Jordan aka SAS Jedi. 

 

What specifically about that macro/process doesn't meet your needs? 

 

 

bondtk
Quartz | Level 8

it doesn't work for SAS Studio, is there any other code for Sas studio UE

ChrisBrooks
Ammonite | Level 13

When you say it doesn't work what specifically do you find when you run it because the instructions in the link are clearly for SAS UE?

Reeza
Super User

@bondtk It does work for SAS UE/SAS Studio - I tested it myself, and the instructions are specifically for SAS UE. 

 

 The instructions in Mark (SASJedi) are not for SAS UE but the ones in the link above are.

 

Follow the steps exactly, using the demo as well and get that working, then try it for your own. If you can't get it working then post back with detailed information on what you tried and what did/didn't work.

 

EDIT: please don't add on to a question that's pretty old, feel free to start your own and reference this if necessary.

bondtk
Quartz | Level 8

Hi Reeza

 

It worked , I was confused , I tried to edit the macro , NOW I got it , I need to run the macro so that I stay in the memory and then run the syntax :

 

%DATA2DATASTEP(dataset name,library,file name,obs)

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!

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
  • 6 replies
  • 855 views
  • 1 like
  • 5 in conversation