BookmarkSubscribeRSS Feed
acanes
Calcite | Level 5
In the exam content tab of the Advanced Certification Exam Program it says the exam has

Reduce programming time by developing reusable SAS programs which incorporate data step views, DATA steps that write SAS programs, and the FCMP procedure.

Does anybody know what DATA steps that write SAS programs means or where I can find documentation on this subject?
3 REPLIES 3
chang_y_chung_hotmail_com
Obsidian | Level 7
There isn't anything special about "Data steps that write SAS programs." SAS code is text strings and data steps can handle text strings with no problem. Here is a simple example:



/* a data step that generates a sas program */

data _null_;

  file "c:\temp\code.sas";

  input;

  put _infile_;

cards4;

  proc print data=sashelp.class;

  run;

;;;;

run;

 

/* one way to run the generated program */

%inc "c:\temp\code.sas" / source; 
Doc_Duke
Rhodochrosite | Level 12
Acanes,

Your question is about something that is generically called "automatic programming."
http://en.wikipedia.org/wiki/Automatic_programming

I frequently use the technique to read the metadata from a database to generate the descriptive statements (LABELs and such) related to the data that is coming in from other tables in the database. Cynthia and Chang showed you other examples.

Doc Muhlbaier
Duke

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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