BookmarkSubscribeRSS Feed
LineMoon
Lapis Lazuli | Level 10

I have a sas programme with a data or sql

for a one variable in my data or sql, i want to get :

1- listing for the transformation of my variable

2- excetuting the data step or sql that contains my variable..

if i want to check for one variable name: delta, I want to have some thing likes this :

Step  1 : listing the transfomation

delta=2*v,

format delat  4.;

or

select delta,

where deleta=

Step 2: listing the data  or proc sql or that contains delta

data toto;

delta=2*v,

....

run;

proc sql;

select delta,

quit;

Step 3: Executing the data or proc that contains the variable delta

Thank you

1 REPLY 1
PGStats
Opal | Level 21

Be careful. There are many ways in SAS to get or change the value of a variable without mentioning its name. There are also many ways to access a variable through an alias. Also, some automatic variables get their values changed as side effects.

And that's only for plain SAS language. Add macro processing over that and the prospect of reverse engineering SAS code becomes elusive.

PG

PG

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 1125 views
  • 0 likes
  • 2 in conversation