LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 3 Feb 2004 12:53:39 +0100
Reply-To:     Marcin Sroka <sroka@SAWAN.COM.PL>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Marcin Sroka <sroka@SAWAN.COM.PL>
Organization: tp.internet - http://www.tpi.pl/
Subject:      Re: [summary] How to compile a SCL model programmatically ?
Content-Type: text/plain; charset=ISO-8859-2; format=flowed

Thank you very much !

I knew I could compile a SCL model automatically with compile='Y' parameter in _setSource method. But I didn't know that you can do it not only from the FRAME you use in your application but from any SCL source which creates a proper environment for the model (e.g. proper table). I couldn't use compile='Y' in the FRAME because sometimes users don't have write access to codes' folder.

So I've decided to use a solution suggested by Richard A. DeVenezia. To include compiling SCL models in my compile mechanism I do:

- create an entry compiling SCL models (e.g. _compile_models.scl): init: declare sashelp.classes.sasdataset_c data = _new_ sashelp.classes.sasdataset_c();

/* prepare a proper env for a model: e.g. data.table = 'sashelp.class'; */ data._setSource('myLibrary.myCatalog.myModel.scl', 'Y'); data._term();

/* and so on for other models in this SAS catalog */ return;

- put a command running above entry in a source compiling all entries in SAS catalog:

/* include macros needed for compilation */ filename m CATALOG 'myLibrary.myCatalog._compile_macros.source'; %include m; filename m;

/* compiling 'ordinary' entries */ proc build catalog = myLibrary.myCatalog batch; compile et=frame; compile select = ( SCLs (but not SCL models) ) ; quit;

/* compiling models */ dm 'afa c=myLibrary.myCatalog._compile_models.scl';

In my SAS 8.2 application I have an old FRAME with a SAS 6.12 Data Table Viewer with a SCL model attached to it. I compile the model with above mechanism and it works well.

Marcin J. Sroka


Back to: Top of message | Previous page | Main SAS-L page