sas af - Compiling SAS SCL code programmatically -


Is a programmatic way to compile SAS 9.1.3 SCL code (NB not normal SAS code) in Windows is? The only way I can do this is to use the SAS GUI: We have a Perl script that sends the keystrokes to the UI. While this work (type), it's ugly and error prone, and is very delicate to add to our automated build script.

EDIT: My original question was probably unclear. I know about proc build ; My problem is getting some plain text in the SAS catalog as an SCL entry in the first place.

I think this is a problem like chicken and egg. I found that it is possible to get plain text in an SCL entry using the already existing SCL entry ...

I have a setup where I read and write the SCL code in list entries And for plain text files I use it for revision control purposes (CVS).

CVS is mostly used for plain text code, but it can handle binary files as well. In this way I have made an SCL login (called FILE2SCL), which can import plain text into other SCL entries. I have so far recorded this SCL entry in a binary file by the Processor Port, and it is checked in CVS.

In this way, I can always get this SCL entry programmatically from the CPRT file and use this SCL entry to import the CCL code from plain text in other SCL entries. Later, I will call the SCL entry To make a compilation I can use Proc build, as you mention yourself.

My FILE2SCL entry looks like this:

  INIT: / ***** **************** ********************************* ******** / / * * / / * This way Call this SCL to: * / / *% srcFile = D: \ work \ dummy.scl; * / / *% DstEntry = Work. New DUMMY.SCL; * / / * Proc display list = work.cat.file2scl.scl; * / / * Run; * / / * * / / ***************************************************************************************** *************************************************************************************************** ********************** Length RC 8; Length $ 200 file; Length $ $ 128; Thefile = symget ('SRCFILE'); * Original file *; TheEntry = symget ('DententRY'); * Destination entry *; * Assign file name *; Rc = file name ('temporary', thefile); * Include external file in preview buffer *; Rc = preview ('include', 'temporary'); * Save the contents of the preview buffer to the SCL log * Rc = Preview ('Save', theEntry); Rc = Preview ('Clear'); Rc = preview ('off'); * Assign file name *; Rc = file name ('temporary', ''); Return;  

How to use it: Start with setting up a SAS macro variable, "srcFile", so that you get the path to your SCL source code file and another macro variable "dstEntry" Where you want the entry path for your SCL entry, the PROC displays the FILE2SCL entry, and it will import your SCL source code into the specified SCL entry, and you can use it later through the Proc Nklit can.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -