sasjs / cli

Command line interface for creating, compiling, and building SAS® projects

Home Page:https://cli.sasjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow passing parameters to a program with `sasjs run` using same `--source` option as for `sasjs job execute`

jbodart-argenx opened this issue · comments

sasjs job execute allows to pass parameters with the following option:

--source (alias -s) - Provide the path to an input JSON containing job variables, structured as follows:

{"macroVars": {"varname": "value", "var2": "val2"}}

It would be beneficial to have the same option available with sasjs run.

Thanks @jbodart-argenx

To clarify, this is the way that we will implement this feature:

  1. The sasjs run command, if -s is present, will convert all the name/value pairs into %let var=value; SAS statements
  2. These statements will be injected as pre-code before being submitted to SAS