BookmarkSubscribeRSS Feed
mdlucas1
Fluorite | Level 6

Hello,

 

I am very new to SAS & SCL (SAS Component Language), but I have some experience with Object-Oriented Languages in my past. I am currently working on some SCL code for a form, and I am currently stuck on how to handle this situation.

 

Issue:

 

When I press a button on a form I am working on, it pulls up a SAS table. However, I would like to adjust the columns before the table opens up by using a 'Retain' statement. Is it possible to run this type of SAS statement from a button that uses SCL? If so, how would I go about doing this?

 

Thanks in advance.

1 REPLY 1
ballardw
Super User

Are you working in SAS/AF or SAS/FSP or a different development environment?

 

In SAS/AF the initial block of the object would allow you to filter data on either an environment variable value or  fixed code but the statement involved would most likely be either a KEEP (to keep variables) or DROP to remove variables. Basically similar but the syntax to list the explicit variables is usually shorter using one option over the other; want 5 of 50 variables then use Keep to list the 5, want 45 of 50 variables use Drop to remove the ones you don't.

 

RETAIN  is used to make the value of a variable propagate across records in a data step.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 579 views
  • 0 likes
  • 2 in conversation