BookmarkSubscribeRSS Feed
AllanBowe
Barite | Level 11

Have you ever needed to deploy some files to a SAS server as part of an implementation, promotion, or project activity?

 

Usually this involves some manual steps, ssh, ftp, drag & drop, robocopy, zipping / unzipping etc etc.

 

Well - there is now "one more" trick for your toolbox!

 

Syntax:


`sasjs fs compile /source/folder --output myprogram.sas`

 

Simply install the sasjs cli and execute the command above - switching "/source/folder" for your target (local) directory, and "myprogram.sas" for the full path to the (local) SAS program you'd like to generate.


This generated program will contain the ENTIRE folder - including subfolders and binary files such as datasets, zip files, excel etc.  You do NOT need to have SAS on your local machine - because the compilation is done using JavaScript.

Once you have compiled the program, you can run it in anywhere in SAS to deploy it - just set the `fsTarget` macro variable to your chosen target directory.  All the subfolders will be created, along with exact copies of each file.


Docs:  https://cli.sasjs.io/fs/


Marking this one as "no solution needed", as it's rather a solution in and of itself!


/Allan
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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 0 replies
  • 563 views
  • 1 like
  • 1 in conversation