Menu

Error Running SASUnit

2017-10-30
2017-10-30
  • Markus Ullrich

    Markus Ullrich - 2017-10-30

    Hello everyone,

    I want to get SASUnit started. Launching sasunit.9.4.windows.en ends with an abortion and the ERROR message

    ERROR(SASUNIT) ErrorSASCall2 in Makro INITSASUNIT (Condition: NOT 0)
    Error spawning SAS process in initialization

    in the run_all.log.
    For now I only edited all paths to my system.

    Can somebody help me with this ERROR?
    Thank you!

    Cheers,
    Markus

     

    Last edit: Markus Ullrich 2017-10-30
  • Markus Ullrich

    Markus Ullrich - 2017-10-30

    Thats the log with the error message.

     
  • Klaus Landwich

    Klaus Landwich - 2017-11-02

    Hello Markus Ullrich,

    SASUnit can't start an dependant SAS Session. To have an idea what went wrong have a look in the log folder of the session.

    There should be a log file named 000.log.

    • If it is present then the dependant SAS Session could be started. Take a look inside the log file for errors.
    • If the log file is not present then it is likely that SASUnit has a problem with the provided config file ans autoexec file. Review the call of initSASUnit.

    Because you are running the example project there should be no issue with the call to initSASUnit.

    Looking forward to your next post.

    Regards
    Klaus Landwich

     
  • Markus Ullrich

    Markus Ullrich - 2017-11-13

    Hello Klaus Landwich,

    sorry for my late reply. In my case the 000.log is not present. I tried to configure the files to get SASUnit going but still get the same error.

    Perhaps some more information will be helpful...
    Im using SAS 9.4 on Windows 8 32 bit and the default folder structure of SASUnit:

    sasunit root installation folder
    \example example root folder
    \bin command scripts and configuration files
    \dat data for example test suite
    \doc html files for access to generated test reports and documentation
    \doxy Doxygen generated files
    \sasunit SASUnit generated files
    \de German SASUnit generated test database (same substructure as for English)
    \en English SASUnit generated test database
    \log SAS log files from run of test suite
    \tst further results from run of test suite
    \rep generated report in HTML format
    \saspgm test scenario programs and units under test for example test suite
    \saspgm SASUnit resources
    \sasunit SASUnit SAS macros
    \template a template for new SAS programs with Doxygen compatible header

    I configured the paths of SAS Base and config path in the auto.exe. For the -CONFIG I needed to use an absolut path because with the realtive one the config File wasnt found:

    "C:\Users\y04675\AppData\Local\Microsoft\AppV\Client\Integration\544DAB31-8246-438F-A8CE-87CC1E17145C\Root\VFS\ProgramFilesX64\SASHome\x86\SASFoundation\9.4\sas.exe" -CONFIG "N:\SASUNIT\example\bin\sasunit.%SASUNIT_SAS_VERSION%.%SASUNIT_HOST_OS%.%SASUNIT_LANGUAGE%.cfg" -no$syntaxcheck -noovp -nosplash

    In the config file I edited the pathof -CONFIG to: "C:\users\y04675\AppData\Local\Microsoft\AppV\Client\Integration\544DAB31-8246-438F-A8CE-87CC1E17145C\Root\VFS\ProgramFilesX64\SASHome\x86\SASFoundation\9.4\nls\en\sasv9.CFG"

    and also needed to set ablsolut paths to run_all.sas run_all.log and run_all.lst.

    I'm not sure which information are helpful for the support.
    In the attachment are the auto.exe, the config and the run_all.sas files.

    Thank you for your support!

     

    Last edit: Markus Ullrich 2017-11-13
  • Markus Ullrich

    Markus Ullrich - 2017-11-13

    and the run_all.sas

     
  • Klaus Landwich

    Klaus Landwich - 2017-11-14

    Hi Markus Ullrich,

    I investigated a bit into your problem.

    Your are using a special configuration and start SAS via a virtual environment. Correct?

    My assumption is based on your path to sas.exe with.../ Microsoft/AppV/...

    In the os-dependent macro _oscmds.sas (in folder "<SASUNIT>/saspgm/sasunit/windows") we retrieve the call to sas.exe from SAS directly. In your environment this creates a different path to sas.exe as you specify in the command shell..

    Namely:
    "C:\Program Files\SASHome\x86\SASFoundation\9.4\sas.exe"

    To circumvent that just change one line in the macro _oscmds.sas in the windows folder.
    Change the marked line

       %LET g_copydir       =xcopy /E /I /Y;
       %LET g_endcommand    =%str( );
       %LET g_makedir       =md;
       %LET g_removedir     =rd /S /Q;
       %LET g_removefile    =del /S /Q;
    >>   %LET g_sasstart      ="%sysget(sasroot)/sas.exe";
       %LET g_splash        =-nosplash;
       %LET g_infile_options=IGNOREDOSEOF;
    

    to

      %LET g_sasstart      ="C:\users\y04675\AppData\Local\Microsoft\AppV\Client\Integration\544DAB31-8246-438F-A8CE-87CC1E17145C\Root\VFS\ProgramFilesX64\SASHome\x86\SASFoundation\9.4\sas.exe";`
    

    And give it a try once again.

    Please post your reults.

    Regards
    Klaus Landwich

     
  • Markus Ullrich

    Markus Ullrich - 2017-11-14

    Hello,

    thanks for the quick response.
    I adjusted my setup with the change in macro oscmds.sas but I still get the same error.

    Moreover, I also thought about that issue. Thats why I tried SASUnit already on a virtual maschine where the SAS installtion path is: "C:\Program Files\SASHome\x86\SASFoundation\9.4\sas.exe"

    Might there be a problem that the SAS Installation is stored at C: and the SASUnit folder at N: ?
    I barely did any changes to the default SASUnit setup... maybe it helps you if I descibe the changes I did:

    In sasunit.9.4.windows.en.cmd

    I changed the SASUnit root path
    and the SASUnit config to

    SET SASUNIT_ROOT=N:\SASUnit

    and I adjusted the path for the sas.exe and the SASUnit config path for my virtual maschine to:

    "C:\Program Files\SASHome\x86\SASFoundation\9.4\sas.exe"
    -CONFIG "%SASUNIT_ROOT%\example\bin\sasunit.%SASUNIT_SAS_VERSION%.%SASUNIT_HOST_OS%.%SASUNIT_LANGUAGE%.cfg
    " -no$syntaxcheck -noovp -nosplash

    In sasunit.9.4.windows.en.cfg

    -CONFIG "C:\Program Files\SASHome\x86\SASFoundation\9.4\nls\en\SASV9.CFG"
    -sysin "sasunit\example\saspgm\run_all.sas"
    -log "sasunit\example\doc\sasunit\en\run_all.log"
    -print "sasunit\example\doc\sasunit\en\run_all.lst"

    But the config file seems ok because if I do a change for example in the -sysin it prompts me with the message: ERROR: Invalid file, ...\run_all.sas.

    In run_all.sas I changed some paths of the macro %initSASUnit

    i_root = %sysget(SASUNIT_ROOT)
    ,io_target = example\doc\sasunit\%lowcase(%sysget(SASUNIT_LANGUAGE))
    ,i_project = example\SASUnit Examples
    ,i_sasunit = %sysget(SASUNIT_ROOT)\saspgm\sasunit
    ,i_sasautos = example\saspgm
    ,i_testdata = example\dat
    ,i_refdata = example\dat
    ,i_sascfg = example\bin\sasunit.%sysget(SASUNIT_SAS_VERSION).%lowcase(%sysget(SASUNIT_HOST_OS)).%lowcase(%sysget(SASUNIT_LANGUAGE)).cfg

    These are my edits...
    I hope my comments are clear and it may help you to understand what I did.

    Regards
    Markus

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.