Writing a SAS procedure?

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Writing a SAS procedure?

[ Edited ]

Many years ago it used to be possible to code procedures for SAS as part of the SUGI Supplemental Library. This is highlighted in Terri Betancourt's 1985 SUGI paper, Writing SAS Procedures.  

 

Has this capability been moved elsewhere in the SAS system, or is it no longer possible for end users to write SAS procedures? 

 

regards,

 

Len Greski


Accepted Solutions
Solution
‎06-10-2016 07:33 AM
Grand Advisor
Posts: 10,251

Re: Writing a SAS procedure?

Do you actually need to write a Procedure or  implement a function for a specific type of calculation?

If what you are actually looking for are functions then Proc Proto is available to link to external routines with Fcmp or Fcmp provides a way to write functions within SAS.

 

What specific functionality are you looking to implement?

View solution in original post


All Replies
Solution
‎06-10-2016 07:33 AM
Grand Advisor
Posts: 10,251

Re: Writing a SAS procedure?

Do you actually need to write a Procedure or  implement a function for a specific type of calculation?

If what you are actually looking for are functions then Proc Proto is available to link to external routines with Fcmp or Fcmp provides a way to write functions within SAS.

 

What specific functionality are you looking to implement?

New Contributor
Posts: 4

Re: Writing a SAS procedure?

Thanks, Ballardw. I was able to complete my task with the SAS macro language, but wanted to know what is available for writing functions to link in with SAS because it's been more than 20 years since I used it extensively. I'll read the documentation for Proc Proto and Fcmp.

 

regards,

 

Len 

Frequent Contributor
Posts: 133

Re: Writing a SAS procedure?

That paper was from SUGI10 which was a long, long time ago. I think what you're looking for is a product called SAS/TOOLKIT but I don't think it's used much as you can nearly always do what you want to do using a macro.

SAS Super FREQ
Posts: 3,420

Re: Writing a SAS procedure?

For sophisticated analyses (especially multivariate analyses), FCMP and macro are usually not sufficient. For those cases, SAS/IML software is the primary way that programmers implement custom algorithms that are not built into any SAS procedure.

See "Ten tips for learning the SAS/IML language."

New Contributor
Posts: 4

Re: Writing a SAS procedure?

Thanks for your input, Rick. I agree that for applications requiring algorithms, SAS/IML is a good choice. Thirty years ago I wrote a number of algorithms in PROC MATRIX (the predecessor to SAS/IML) for social network analysis. The rationale for my question is that it's been quite a while since I used SAS and wanted to know whether there was an equivalent to the old SUGI library of user-defined procedures from back when I used the software regularly. 

 

The specific application about which I was asking the question is to read a number of files from the file system, combine them into a single SAS data set, and run a statistical procedure. I solved the problem with a macro but the code is a lot more complicated than the approach I've used in R, which I can code in a user defined function of 1 R statement. I wanted to know whether there is currently a way to code what I've coded in R as a procedure that could be called with a small number of parameters as inputs. 

 

regards,

 

Len  

New Contributor
Posts: 4

Re: Writing a SAS procedure?

Thanks, Chris. I vaguely remember TOOLKIT. I'll take a look at the documentation.

 

regards,

 

Len

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 470 views
  • 1 like
  • 4 in conversation