I'm testing SASUnit 2.0 with SAS Studio.
I've an error when running for the first time %reportsasunit :
MPRINT(REPORTSASUNIT._REPORTLOGHTML._CHECKLOG): RUN;
ERROR: Physical file does not exist, \xxxx\xxxx\sasunit\sasunit_example\output\log\000.log.
NOTE: The SAS System stopped processing this step because of errors.
MPRINT(REPORTSASUNIT._REPORTLOGHTML): ;
I've no error when running %reportsasunit another time due to "IF tsu_lastinit > tsu_lastrep OR &o_force. THEN DO;" condition in %reportsasunit macro (000.log is not used when running %reportsasunit a second time).
I noticed that this behaviour could be linked to %initsasunit macro update compared to SASUnit 1.7 version. Code below is now related to condition "%IF (&g_runMode. = SASUNIT_BATCH) %THEN %DO;"
%_runProgramSpawned(i_program =&l_work./check_spawning.sas
,i_scnid =000
,i_generateMcoverage=0
,r_sysrc=l_sysrc
,i_pgmIsScenario =0
);
--> It seems that there's no "000.log" file created when "_runMode" is different than "SASUNIT_BATCH" with SASUnit 2.0?
Did I miss something in my settings in run_all.sas file? Or in one another configuration file?
Thanks in advance for your answer.
Anonymous
This behaviour may be linked to this previous ticket https://sourceforge.net/p/sasunit/bugs/188/?
Have a great day.
Hi Benoît ORY,
great that you are testing SASUnit in SAS Studio. If you have any further trouble keep posting.
For your current problem I suppose that you need to create that log folder in your path. It's obviously not the standard path ".../sasunit/example/<language>/log".
SAS needs the full path to create a log file. Unfortunately that path is wether checked in advance nor created. So run_all.sas cannot create this log file.
Just create that log folder in your path aund all should run smoothly.</language>
Log file 000.log is created when testing the capability of spawning SAS session. That functionality is only used in batch mode. That's why you don't get that error while running SASUnit in SAS Studio.
Regards
Klaus
Last edit: Klaus Landwich 2022-03-24
Hi Klaus,
"Log file 000.log is created when testing the capability of spawning SAS session. That functionality is only used in batch mode. That's why you don't get that error while running SASUnit in SAS Studio."
--> I've this error when running SASUnit in SAS Studio.
I updated reportsasunit.sas code to avoid it (I'll never run SASUnit in batch mode) :
/-- only if testsuite has been initialized anew after last report -----/
IF (tsu_lastinit > tsu_lastrep OR &o_force.) and "&g_runMode." = "SASUNIT_BATCH" THEN DO;
Best regards,
Benoît
Hi Benoît,
now I see your problem.
When running SASUnit in an interactive environment like SAS Enterprise Guide, SAS Studio or even display mananger then there is a lightweighed reporting component in endScenario.sas.
Therefore You don't need to run reportSASUnit.sas. You don't even have to call runSASUnit.sas
What you need is a call to initSASUnit.sas and that's it.
I assume You don't have access to Enterprise Guide right?
Is it possible to convert an Enterprise Guide Project to a SAS Studio file? I think so.
There is an example egp file.
It contains a call to iniSASUnit.sas in the autoexec process flow.
Besides that there are only calls to scenarios. Nothing else.
This is the reduced call to initSASUnit from teh egp file:
You don't need anything else.
No runSASUnit.sas and no reportSASUnit.sas.
Regards
Klaus