Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
ms_getfile.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing ms_getfile.sas macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getuniquename.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9 @li ms_createfile.sas
10 @li ms_getfile.sas
11
12**/
13
14
15/* first make a remote file */
16filename stpcode temp;
17%let fname=%mf_getuniquename();
18data _null_;
19 file stpcode;
20 put "data &fname;run;";
21run;
22%ms_createfile(/sasjs/tests/&fname..sas
23 ,inref=stpcode
24 ,mdebug=1
25)
26
27%mp_assertscope(SNAPSHOT)
28%ms_getfile(/sasjs/tests/&fname..sas,outref=testref)
29%mp_assertscope(COMPARE)
30
31%let test1=0;
32data _null_;
33 infile testref;
34 input;
35 call symputx('test1',_infile_);
36run;
37
38%mp_assert(
39 iftrue=("&test1"="data &fname;run;"),
40 desc=Checking file was created with the same content,
41 outds=work.test_results
42)
43
44
45
46