-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: partial short numeric support in mp_ds2csv
- Loading branch information
^
committed
Feb 23, 2024
1 parent
b7bca48
commit e616bc9
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
@file | ||
@brief Testing mp_ds2csv.sas macro | ||
<h4> SAS Macros </h4> | ||
@li mp_ds2csv.sas | ||
@li mp_assert.sas | ||
@li mp_assertscope.sas | ||
**/ | ||
|
||
data work.shortnum; | ||
length a 3 b 4 c 8; | ||
a=1;b=2;c=3; | ||
output; | ||
stop; | ||
run; | ||
|
||
/** | ||
* Test 1 - default CSV | ||
*/ | ||
|
||
%mp_ds2csv(work.shortnum,outfile="&sasjswork/test1.csv",headerformat=SASJS) | ||
|
||
%let test1b=FAIL; | ||
data _null_; | ||
infile "&sasjswork/test1.csv"; | ||
input; | ||
list; | ||
if _n_=1 then call symputx('test1a',_infile_); | ||
else if _infile_=:'1,2,3' then call symputx('test1b','PASS'); | ||
run; | ||
|
||
%mp_assert( | ||
iftrue=("&test1a"="A:best3. B:best4. C:best."), | ||
desc=Checking header row Test 1, | ||
outds=work.test_results | ||
) | ||
%mp_assert( | ||
iftrue=("&test1b"="PASS"), | ||
desc=Checking data row Test 1, | ||
outds=work.test_results | ||
) |