Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mfv_getpathuri.sas File Reference

Returns the uri of a file or folder. More...

Go to the source code of this file.

Detailed Description

The automatic variable _FILESRVC_[fref]_URI is used after assigning a fileref using the filesrvc engine. If the path does not exist the macro prints a note, returns nothing, and resets syscc to zero.

A non zero syscc on entry means an earlier step has already failed. The macro logs a str(ERR)OR: line and returns an empty uri without touching syscc, so a caller that tests the uri for blankness sees no path, and the failure stays visible in syscc.

Usage:

%put %mfv_getpathuri(/Public/folder/file.txt);
%put %mfv_getpathuri(/Public/folder);
Parameters
[in]filepathThe full path to the file on SAS drive (eg /Public/myfile.txt)

SAS Macros

Related Macros

Version
3.5
Author
Allan Bowe

Definition in file mfv_getpathuri.sas.