1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-12 03:00:04 +00:00

Merge pull request #278 from sasjs/allanbowe/add-iftrue-parameter-277

fix: iftrue parameter for mp_binarycopy.  Closes #277
This commit is contained in:
Allan Bowe
2022-07-07 11:29:25 +01:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -3505,6 +3505,7 @@ run;
@param [in] mode (CREATE) Valid values:
@li CREATE - Create the file (even if it already exists)
@li APPEND - Append to the file (don't overwrite)
@param iftrue= (1=1) Supply a condition for which the macro should be executed
@returns nothing
@@ -3518,8 +3519,12 @@ run;
,inref=____in /* override default to use own filerefs */
,outref=____out /* override default to use own filerefs */
,mode=CREATE
,iftrue=%str(1=1)
)/*/STORE SOURCE*/;
%local mod;
%if not(%eval(%unquote(&iftrue))) %then %return;
%if &mode=APPEND %then %let mod=mod;
/* these IN and OUT filerefs can point to anything */

View File

@@ -31,6 +31,7 @@
@param [in] mode (CREATE) Valid values:
@li CREATE - Create the file (even if it already exists)
@li APPEND - Append to the file (don't overwrite)
@param iftrue= (1=1) Supply a condition for which the macro should be executed
@returns nothing
@@ -44,8 +45,12 @@
,inref=____in /* override default to use own filerefs */
,outref=____out /* override default to use own filerefs */
,mode=CREATE
,iftrue=%str(1=1)
)/*/STORE SOURCE*/;
%local mod;
%if not(%eval(%unquote(&iftrue))) %then %return;
%if &mode=APPEND %then %let mod=mod;
/* these IN and OUT filerefs can point to anything */