Currently I try to get the SASUnit toolbox to run in batch mode on a
Linus X64 Server. The SASUnit script will be started via a bash without
using an XDisplay.
I came across the following issues - which puzzles me a little bit.
Although the path in setting the autocall library within %initSASUnit is
correct, the macro is not known when it comes to testing.
As a workaround I entered an %include statement in *_test.sas.
Then everything is working fine.
Did you ever come across this issue as well?
Is there a solution to this?
Do you see any problems by using the %include statement?
Please specify if you need extra information!
Best regards
Stefanie
Last edit: Klaus Landwich 2021-01-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-01-18
Hi Stefanie
the solution depends somewhat on the nature of the macros contained in the directory "path/to/macrodefinition/v1.01.001/dev/macros".
If you store this path in the %initSASUnit call with an i_sasautosn, then all programs in it are considered as potential examinees and are scanned. For this they are included automatically by SASUnit into the Autocall path.
If there are auxiliary macros in this directory, which are necessary for the test objects, then you can specify these also in an autoexec file and pass it on to the %initSASUnit call (parameter i_autoexec). There you can also store the setting of the libnames and the FMTSEARCH path. This Autoexec will be passed to the SAS session when the Scenarios are started.
The only thing that speaks against including such code snippets in all *_test.sas programs is the effort if something changes in the paths.
So a code snippet that is included everywhere with %include would be ok from my point of view but only half as nice as the other two solutions.
Greetings
Klaus Landwich
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Currently I try to get the SASUnit toolbox to run in batch mode on a
Linus X64 Server. The SASUnit script will be started via a bash without
using an XDisplay.
I came across the following issues - which puzzles me a little bit.
Although the path in setting the autocall library within %initSASUnit is
correct, the macro is not known when it comes to testing.
MPRINT(_LOADENVIRONMENT): ;
MPRINT(_LOADENVIRONMENT): OPTIONS MAUTOSOURCE
APPEND=(SASAUTOS=("path/to/sasunit/saspgm/sasunit/linux"
"path/to/macrodefinition/v1.01.001/dev/macros" ));
As a workaround I entered an %include statement in *_test.sas.
Then everything is working fine.
Did you ever come across this issue as well?
Is there a solution to this?
Do you see any problems by using the %include statement?
Please specify if you need extra information!
Best regards
Stefanie
Last edit: Klaus Landwich 2021-01-15
Hi Stefanie
the solution depends somewhat on the nature of the macros contained in the directory "path/to/macrodefinition/v1.01.001/dev/macros".
If you store this path in the %initSASUnit call with an i_sasautosn, then all programs in it are considered as potential examinees and are scanned. For this they are included automatically by SASUnit into the Autocall path.
If there are auxiliary macros in this directory, which are necessary for the test objects, then you can specify these also in an autoexec file and pass it on to the %initSASUnit call (parameter i_autoexec). There you can also store the setting of the libnames and the FMTSEARCH path. This Autoexec will be passed to the SAS session when the Scenarios are started.
The only thing that speaks against including such code snippets in all *_test.sas programs is the effort if something changes in the paths.
So a code snippet that is included everywhere with %include would be ok from my point of view but only half as nice as the other two solutions.
Greetings
Klaus Landwich