Use Global Macro Variables in SCE Programs

This article is currently being updated. Please come back later for updates.

In SCE, the convenience of SAS programming can be enhanced though the use of global macro variables. This provides a more efficient and flexible approach for referencing folders dynamically, eliminating the need for cumbersome folder paths.

By leveraging macro variables, there is no need to explicitly specify the absolute drive and path in code. Instead, the dynamic absolute path can be seamlessly adapted, ensuring program portability across various studies.

The integration of macro variables occurs during the autoexec process; therefore, at runtime, the dynamic absolute path is determined on the compute node. The use of macro variables facilities the compartmentalization of each execution, enabling load balancing and other advantages.

Macro Variables

Use Macro Variables to point to data or file locations in SCE.

SCE Folder Tree

Macro Variable Purpose Equivalent Path
&sceRoot Overall root folder for SCE \Root
&sceGlobal Global area \Root\Global
&sceWorkspace My Workspace area \Root\MyWorkspace
&sceStudy Current study files \Root\<study schema prefix>
&sceData Current study Data Marts \Root\<study schema prefix>\&sceDataMarts\<data mart name>
&sceDataMarts Data Marts under a study folder

(Other Study Files) \Root\<study schema prefix>\<subfolder>

(Other Study Data) \Root\<study schema prefix>\&sceDataMarts\<data mart name>

Macro Variables listed below are available beginning in v23.3.0

&sceTA Therapeutic area of study

 

&sceCompound Compound of study

 

&sceProgram Program name of study

 

&sceStudyName Full study name

 

&sceFileStatus SDLC workflow status of program file*

 

*Not available for usage in SAS Studio

Tip: When referencing another study, the Schema Prefix must be used instead of the study name. The Schema Prefix can be found in the ETL tab within Study Configuration.
Schema Name

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request