From 0bb95145d724ecab2f8465d2ce21eaee1438b4ef Mon Sep 17 00:00:00 2001 From: yabwon Date: Fri, 24 Apr 2020 17:42:46 +0200 Subject: [PATCH] version 20200424 bug fix for testing packages under Linux --- generatePackage.sas | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/generatePackage.sas b/generatePackage.sas index f33f020..ffcd867 100644 --- a/generatePackage.sas +++ b/generatePackage.sas @@ -36,7 +36,7 @@ */ /**#############################################################################**/ -/* Macros to generate SAS packages, version 20200422 */ +/* Macros to generate SAS packages, version 20200424 */ /* A SAS package is a zip file containing a group of SAS codes (macros, functions, datasteps generating data, etc.) wrapped up together and %INCLUDEed by @@ -1105,7 +1105,7 @@ data _null_; put ' end ; '; %end; - put 'put "***"; put "* SAS package generated by generatePackage, version 20200422 *"; put "***";'; + put 'put "***"; put "* SAS package generated by generatePackage, version 20200424 *"; put "***";'; put 'run; ' /; @@ -1270,6 +1270,9 @@ options DLCREATEDIR; /* turns-on creation of subdirectories */ /* temporary location for tests results */ libname TEST "&SASWORK./test_%lowcase(%sysfunc(datetime(),b8601dt19.))"; libname TESTWORK "%sysfunc(pathname(TEST))/work"; +%local dirForTest; + %let dirForTest = %sysfunc(pathname(TEST)); + /* remember location of sessions current directory */ filename currdir "."; @@ -1285,7 +1288,7 @@ filename packages list; /* replace current dir with the temporary one for tests */ %put *NOTE: changing current folder to:*; -%put *%sysfunc(DLGCDIR(%sysfunc(pathname(TEST))))*; +%put *%sysfunc(DLGCDIR(&dirForTest.))*; /* the first test is for loading package, testing help and unloading */ /*-1-*/ @@ -1314,11 +1317,11 @@ systask kill sas0 wait; %let TEST_0 = loading; systask command """&SASEXE."" - -sysin ""./&TEST_0..sas"" - -print ""./&TEST_0..lst"" - -log ""./&TEST_0..log"" + -sysin ""&dirForTest./&TEST_0..sas"" + -print ""&dirForTest./&TEST_0..lst"" + -log ""&dirForTest./&TEST_0..log"" -config ""&SASROOT./sasv9.cfg"" - -work ""./work"" + -work ""&dirForTest./work"" -noterminal" taskname=sas0 status=sasstat0 @@ -1387,11 +1390,11 @@ systask kill sas&t. wait; %local sasstat&t. TESTRC_&t; systask command """&SASEXE."" - -sysin ""./&&TEST_&t...sas"" - -print ""./&&TEST_&t...lst"" - -log ""./&&TEST_&t...log"" + -sysin ""&dirForTest./&&TEST_&t...sas"" + -print ""&dirForTest./&&TEST_&t...lst"" + -log ""&dirForTest./&&TEST_&t...log"" -config ""&SASROOT./sasv9.cfg"" - -work ""./work"" + -work ""&dirForTest./work"" -noterminal" taskname=sas&t. status=sasstat&t.