Help using Base SAS procedures

PROC FCMP - why a three-level name for OUTLIB ?

Reply
Contributor
Posts: 39

PROC FCMP - why a three-level name for OUTLIB ?

Hi to all

just wondering.. what can you do with the three level name you're indicating with the OUTLIB option of PROC FCMP? (and why a three level name ?)

I'm understanding that the third part of the name is the name of the entry but when will I use this name ?

not with OPTIONS CMPLIB=... ;
and not when deleting a function...

To see this, I created a function named DIVISEE and indicated OUTLIB=SASUSER.FUNCS.TEMPA

I asked just after that to delete that function and indicated OUTLIB=SASUSER.FUNCS.TEMP (I created another function using that outlib) and my DIVISEE fonction was deleted.

best regards

Sébastien
Contributor
Posts: 39

Re: PROC FCMP - why a three-level name for OUTLIB ?

A reply to myself (but it could be usefull to someone else)

this is a copy/paste from this paper by Peter Eberhardt
http://www.lexjansen.com/mwsug/2009/appdev/MWSUG-2009-A03.pdf

"Looking back at the outlib= option for PROC FCMP we see there are three levels in the name; in our datesInMonth example the library was work.funcs.Dates. What does this mean? All of the functions defined in this call to PROC FCMP will be saved in a package called Dates; the package is stored in the data set work.funcs. A package is simply the collection of functions and subroutines, each with a unique name. Although it is possible to have the same function name in two different packages on the same data set there is no way within a DATA step to specify which package to use.
Although it is not possible to be able to access the two versions of a function if they are in different packages in the same data set, it is possible to access different versions of the same function if they are in different data sets. For example, the Risk department may have a larger set of parameters for a particular function (or functions) than the rest of the company. The subset of risk related functions could be in the package allfuncs.risk.dates while the common set (including the general set of functions intended for Risk) could be in the package allfunc.company.dates. Then, to make sure each gets the appropriate versions the cmplib= options could be set as follows:
1. Risk: cmplib=( allfunc.company.dates. allfuncs.risk.dates)
2. Everyone else: cmplib= allfunc.company.dates.
The cmplib= option can set a “search path” of libraries. Note that the search path is left to right (allfuncs.risk.dates is search first, then allfunc.company.date); this behaviour is not the same as other SAS “search paths” such as fmtsearch=, so be careful when using it."

best regards

Sébastien
Ask a Question
Discussion stats
  • 1 reply
  • 331 views
  • 0 likes
  • 1 in conversation