BookmarkSubscribeRSS Feed
dsriggs1
Calcite | Level 5

I know that ODS output has some data step capabilities such as keep, drop, and rename.  Is it also possible to create a new variable/column using ODS output without having to use a data step?

3 REPLIES 3
mkeintz
PROC Star

It is no more possible to generate a new variable using ODS output than it is possible to generate a new column of values in, say, the ODS HTML or ODS LISTING results.  After all ODS OUTPUT is meant to redirect results of a given procedure.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Reeza
Super User

Sadly no. 

 

 

WarrenKuhfeld
Rhodochrosite | Level 12

To be pedantic, you can specify data set options on the output data set name in an ODS OUTPUT statement, just as you can in data set names elsewhere (including the DATA step).  There are not any DATA step capabilities in the ODS OUTPUT statement.  Out of curiosity, what do you want the ODS OUTPUT statement to do that it does not already do?  What is the problem with writing a DATA step?  As you are developing code (and presumably making mistakes) do you really want to submit the PROC step over and over instead of a small, fast, simple, DATA step?

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
  • 977 views
  • 0 likes
  • 4 in conversation