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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1161 views
  • 1 like
  • 5 in conversation