Each script has a global variable called env, which provides access to the ScriptEnvironment object within which it runs and hosts the features that lead to granting access to documents and the document repository. A repository can be the Reporting and Analysis repository, if the script is running in EPM Workspace, or the file system, if the script is running on the desktop.