Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mv_getjobcode.sas File Reference

Extract the source code from a SAS Viya Job. More...

Go to the source code of this file.

Detailed Description

Extracts the SAS code from a Job into a fileref or physical file. Example:

%mv_getjobcode(
  path=/Public/jobs
  ,name=some_job
  ,outfile=/tmp/some_job.sas
)
Parameters
[in]access_token_var=The global macro variable to contain the access token
[in]grant_type=valid values:
  • password @liauthorization_code
  • detect - will check if access_token exists, if not will use sas_services if a SASStudioV session else authorization_code. Default option.
  • sas_services - will use oauth_bearer=sas_services
[in]path=The SAS Drive path of the job
[in]name=The name of the job
[in]mdebug=(0)set to 1 to enable DEBUG messages
[out]outref=(0)A fileref to which to write the source code (will be created with a TEMP engine)
[out]outfile=(0)A file to which to write the source code
Version
VIYA V.03.04
Author
Allan Bowe, source: https://github.com/sasjs/core

SAS Macros

Definition in file mv_getjobcode.sas.