Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mp_webin.sas File Reference

Fix the _WEBIN variables provided to SAS web services. More...

Go to the source code of this file.

Detailed Description

When uploading files to SAS Stored Processes or Viya Jobs a number of global macro variables are automatically created - however there are some differences in behaviour both between SAS 9 and Viya, and also between a single file upload and a multi-file upload.

This macro "straightens" up the global macro variables to make it easier / simpler to write code that works in both environments and with a variable number of file inputs.

After running this macro, the following global variables will always exist:

  • _WEBIN_FILE_COUNT
  • _WEBIN_FILENAME1
  • _WEBIN_FILEREF1
  • _WEBIN_NAME1

Usage:

mp_webin()

This was created as a macro procedure (over a macro function) as it will also use the filename statement in Viya environments (where _webin_fileuri is provided).

SAS Macros

Definition in file mp_webin.sas.