When asking question on the forum, it's incredibly helpful to provide sample data. Sometimes you can get away with referencing SASHELP datasets, but it's also nice to be able to use your own data, especially if you have a complex structure or just code that will work on your computer.
Mark Jordan has written a SAS macro that will generate a data step version of your data. This post goes through how to use it on SAS University Edition. You add the code to your autoexec so that it's available everytime you start up SAS UE.
The macro call is:
%data2datastep(dsn, lib, file, obs);
dsn = input data set name, required
lib = library where input data set resides, optional
file = name of output file, optional
obs = number of obs to include in the data step, optional
Here's how to get it installed and working in SAS UE.
1. Download the zip file from Mark's blog: http://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/
2. Extract the zip file and place the data2datastep.sas program into your myfolders folder set up.
3. In SAS University Edition, go to the Edit the AutoExec file to add the program to your autoexec
4. In the Autoexec, add the reference to the program, and RUN, then SAVE.
%include '/folders/myfolders/data2datastep.sas' /lrecl=1000;
5. Test the code in SAS UE
6. A file is generated called create_sashelp_CARS_data.sas
data SASHELP.CARS; infile datalines dsd truncover; input Make:$13. Model:$40. Type:$8. Origin:$6. DriveTrain:$5. MSRP:DOLLAR8. Invoice:DOLLAR8. EngineSize:32. Cylinders:32. Horsepower:32. MPG_City:32. MPG_Highway:32. Weight:32. Wheelbase:32. Length:32.; datalines4; Acura,MDX,SUV,Asia,All,"$36,945","$33,337",3.5,6,265,17,23,4451,106,189 Acura,RSX Type S 2dr,Sedan,Asia,Front,"$23,820","$21,761",2,4,200,24,31,2778,101,172 Acura,TSX 4dr,Sedan,Asia,Front,"$26,990","$24,647",2.4,4,200,22,29,3230,105,183 Acura,TL 4dr,Sedan,Asia,Front,"$33,195","$30,299",3.2,6,270,20,28,3575,108,186 Acura,3.5 RL 4dr,Sedan,Asia,Front,"$43,755","$39,014",3.5,6,225,18,24,3880,115,197 ;;;;
Voila! You have data to post in the forum!