sasjs / cli

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

Ability to manage folders from CLI in SAS 9 #117

Closed YuryShkoda closed 2 years ago

YuryShkoda commented 4 years ago

Related issue #73

On SAS 9, the most reliable way to do this is using the batch tools. This will necessitate the use of an SSH connection to SAS.

Additional variables will also be needed in the .env file:

The SAS_USERNAME & SAS_PASSWORD will have been captured from the sasjs auth command.

Running the sasjs folder delete command for a SAS9 target will result in the following:

  1. Extract SAS_USERNAME and de-coded SAS_PASSWORD from .env.target file
  2. Prepare script for SSH execution eg as follows:
#!/usr/bin/env bash
cd "$SAS_TOOLS"
./sas-delete-objects \\
  "$PATH_TO_DELETE" \\
  -host $META_SERVER -port $META_PORT \\
  -user '$SAS_USERNAME' -password "$SAS_PASSWORD" \\
  -deleteContents 2>&1
  1. Execute the script (first making sure the batch tool exists) and fetch the log

There should be no trace of the de-coded SAS_PASSWORD on either the local or remote system.

allanbowe commented 2 years ago

Following a recent poll, we plan to reduce our focus on SAS 9 EBI support: https://www.linkedin.com/posts/allanbowe_sas-sasusers-activity-6940952346545840129-rO_y?utm_source=linkedin_share&utm_medium=member_desktop_web