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 ms_createfile.sas
7 @li ms_getfile.sas
8 @li mp_assert.sas
9 @li mp_assertscope.sas
10
11**/
12
13
14/* first make a remote file */
15filename stpcode temp;
16%let fname=%mf_getuniquename();
17data _null_;
18 file stpcode;
19 put "data &fname;run;";
20run;
21%ms_createfile(/sasjs/tests/&fname..sas
22 ,inref=stpcode
23 ,mdebug=1
24)
25
26%mp_assertscope(SNAPSHOT)
27%ms_getfile(/sasjs/tests/&fname..sas,outref=testref)
28%mp_assertscope(COMPARE)
29
30%let test1=0;
31data _null_;
32 infile testref;
33 input;
34 call symputx('test1',_infile_);
35run;
36
37%mp_assert(
38 iftrue=("&test1"="data &fname;run;"),
39 desc=Checking file was created with the same content,
40 outds=work.test_results
41)
42
43
44
45