sasjs / cli

Command line interface for creating, compiling, and building SAS® projects
https://cli.sasjs.io
MIT License
37 stars 5 forks source link

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

Closed jbodart-argenx closed 2 years ago

jbodart-argenx commented 2 years ago

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.

allanbowe commented 2 years ago

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