BookmarkSubscribeRSS Feed
Obsidian | Level 7

I am trying to build a job flow containing a series of scheduled jobs in SASEnvironmentManager viya.
I would need at the beginning of the process to pass a parameter (like a %let type=AA) that goes into the subsequent sas codes.
I found the command Line tab but I don't understand how I need to configure it. 




Barite | Level 11

Hi Luca,


Here at 4GL Apps we built an open-source (MIT) framework that you can use to run jobs and flows from command line.  You can pass parameters (as macro variables) and collect return codes.  You can even run it on SAS 9 EBI and Base SAS, as well as Viya!


The docs are here:



I extract the documentation for your perusal:


sasjs job <action> <job path> [additional arguments]

Additional arguments may include:

  • --log (alias -l) - path where the log of the finished job will be saved (if used, -w is implied).
  • --output (alias -o) - path where output of the finished job execution will be saved.
  • --source (alieas -s) - Provide the path to an input JSON containing job variables, structured as follows: {"macroVars":{"varname":"value","var2":"val2"}}
  • --target (alias -t) - the target environment in which to deploy the services. If not specified, default target will be used, mentioned in sasjsconfig.json. The target can exist either in the local project configuration or in the global .sasjsrc file.

The following flags are only relevant for serverType VIYA:

  • --ignoreWarnings (alias -i) - If present and return status only is provided, CLI will return status '0', when the job state is warning.
  • --returnStatusOnly (alias -r) - If present and wait flag is provided, CLI will job status only (0 = success, 1 = warning, 2 = error).
  • --wait (alias -w) - if present, CLI will wait for job completion.


SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation