Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What happens when you mix base sas with compiled sas?


Asked by Stephen Proctor on Dec 11, 2021 SAS



You are mixing up two very different systems. Base SAS - this is the programming language and the one that is compiled. At compile time the compiler checks your datastep and encounters a variable of y which is not in the dataset, therefore it puts a warning out to the log.
Indeed,
The macro is compiled only once. When you call the macro in the current and subsequent SAS® sessions, SAS executes the compiled code from the macro catalog that you created when you compiled the macro. The stored compiled facility has two main purposes.
Consequently, Base SAS is a fourth-generation programming language (4GL) for data access, data transformation, analysis and reporting. It is included with the SAS Platform. Base SAS is designed for foundational data manipulation, information storage and retrieval, descrip - tive statistics and report writing.
Moreover,
The %COPY statement enables you to retrieve the macro source code and write the code to a file. Here is the syntax: This %COPY statement writes the source code for the TEST macro to the TEST.SAS file. Using TEST.SAS, you are now able to update the macro or compile the macro on another machine.
In this manner,
Data errors occur when some data values are not appropriate for the SAS statements that you have specified in the program. For example, if you define a variable as numeric, but the data value is actually character, SAS generates a data error.