Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing CST in SAS EG #8

Open
YDangPMC opened this issue Mar 31, 2023 · 7 comments
Open

Installing CST in SAS EG #8

YDangPMC opened this issue Mar 31, 2023 · 7 comments

Comments

@YDangPMC
Copy link

Hello,
I'm trying to install the open source CST to use in SAS EG. I've installed Apache ANT and downloaded the v1.7.5 release package. In the config.properties file (C:\Program Files\SASHome\SASStudioSingleUser\3.8\war\config), I've added the following.

#---SAS Clinical Standards toolkit
SET CSTHOME C:Users\Y.D.Dang_pc\Documents\SAS CST\cstFrameworkLibrary
CSTGLOBALLIB C:Users\Y.D.Dang_pc\Documents\SAS CST\cstGlobalLibrary
CSTSAMPLELIB C:Users\Y.D.Dang_pc\Documents\SAS CST\cstSampleLibrary
insert sasautos '!CSTHOME/macros'
JREOPTIONS (-Dsas.app.class.dirs=!CSTHOME/jar)
SET CLASSPATH !CSTHOME/jar

I'm currently however unable to run any of the programs. E.g. if I run cstvalidate I'm getting the following message:
WARNING: Apparent symbolic reference _CST_RC not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:
&_cst_rc
ERROR: The macro CSTVALIDATE will stop executing.

  1. Is the config file the correct one as I'm using SAS EG.
  2. If correct should I add a '-' before each line. E.g. -SET CSTHOME.... ( It is originally added in the txt file in sctFrameworklibrary)
  3. I'm not able to stop server. Is it automatically stopped if I close SAS EG? A local server on my machine is used.
  4. Any other points that I've missed that might cause these errors?

Thanks,
Yen

@michaelkilhullen
Copy link
Contributor

I'm not sure about EG configurations but I did notice that your paths are missing a slash: C:Users... should be C:\Users...

@YDangPMC
Copy link
Author

Thanks,
But it's still not working. I've added the slash and an include to run the cstFramework programs and initialized the global macro variables,
But I'm still getting a fatal error in cstvalidate and several libraries can not be found.

Added in SAS program:
%include "C:\Users\Y.D.Dang_pc\Documents\SAS CST\cstFrameworkLibrary\macros*.sas";

/*
initialize the global macro variables needed by the framework
/
Options macrogen symbolgen mlogic mprint mfile;
%cst_setstandardproperties(
_cstStandard=CST-FRAMEWORK
,_cstSubType=initialize
);
/

initialize the global macro variables needed by CDISC SDTM
*/
..............

Part of SAS log:
27 /%include "C:\cstFrameworkLibrary\macros*.sas";/
28 /%include "C:\Users\Y.D.Dang_pc\Documents\SAS CST\cstFrameworkLibrary\macros\cstvalidate.sas";/
29 %include "C:\Users\Y.D.Dang_pc\Documents\SAS CST\cstFrameworkLibrary\macros*.sas";
MLOGIC(CSTVALIDATE): Beginning execution.
MLOGIC(CSTVALIDATE): Parameter _CSTCALLINGPGM has value Unspecified
MLOGIC(CSTVALIDATE): Parameter _CSTREPORTOVERRIDE has value N
SYMBOLGEN: Macro variable _CST_RC resolves to 1
MLOGIC(CSTVALIDATE): %IF condition &_cst_rc is TRUE
MLOGIC(CSTVALIDATE): %PUT ****************************************************************


MLOGIC(CSTVALIDATE): %PUT ERROR: Fatal error encountered, validation process cannot start.
ERROR: Fatal error encountered, validation process cannot start.

..............

MPRINT(CSTUTIL_CREATETEMPMESSAGES): set _cst5154.standards (where=( (upcase(standard)="CST-FRAMEWORK") AND
(upcase(isStandardDefault)="Y") ));
ERROR: Library _CST5154 does not exist.
...........

MPRINT(CSTUTIL_CREATETEMPMESSAGES): * Include the generated code;
SYMBOLGEN: Macro variable _CSTNEXTCODE resolves to _cst0371
ERROR: Catalog WORK._CST0371 does not exist.
ERROR: Cannot open %INCLUDE file _CST0371.

@michaelkilhullen
Copy link
Contributor

michaelkilhullen commented Apr 12, 2023

let's start by seeing what's actually defined in your SAS session for CST. Start your SAS session and run this code.

%put %sysget(CSTHOME);
%put %sysget(CLASSPATH);

proc options
option=cstgloballib
option=cstsamplelib
option=sasautos
option=jreoptions;
run;

@YDangPMC
Copy link
Author

Below the log. It doesn't seem like adding the set statements to the properties config file worked.

25 GOPTIONS ACCESSIBLE;
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
26 %put %sysget(CSTHOME);

27 %put %sysget(CLASSPATH);
WARNING: The argument to macro function %SYSGET is not defined as a system variable.

28
29
30
31 proc options
32 option=cstgloballib
33 option=cstsamplelib
34 option=sasautos
35 option=jreoptions;
36 run;

SAS (r) Proprietary Software Release 9.4  TS1M6

CSTGLOBALLIB= Specifies the location of the SAS Clinical Standards Toolkit global library.
CSTSAMPLELIB= Specifies the location of the SAS Clinical Standards Toolkit sample library.
SASAUTOS=SASAUTOS Specifies the location of one or more autocall libraries.
JREOPTIONS=( -DPFS_TEMPLATE=C:\Program Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\qrpfstpt.xml
-Djava.class.path=C:\PROGRA1\SASHome\SASVER1\eclipse\plugins\SASLAU1.JAR -Djava.security.auth.login.config=C:\Program
Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\sas.login.config -Djava.security.policy=C:\Program
Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\sas.policy -Djava.system.class.loader=com.sas.app.AppClassLoader
-Dlog4j.configuration=file:/C:/Program%20Files/SASHome/SASFoundation/9.4/tkjava/sasmisc/sas.log4j.properties
-Dsas.app.class.path=C:\PROGRA
1\SASHome\SASVER1\eclipse\plugins\tkjava.jar -Dsas.ext.config=C:\Program
Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\sas.java.ext.config
-Dsas.jre.libjvm=C:\PROGRA
1\SASHome\SASPRI1\9.4\jre\bin\server\jvm.dll
-Dtkj.app.launch.config=C:\PROGRA
1\SASHome\SASVER~1\picklist -Xms128m -Xmx128m )
Specifies the Java Runtime Environment options for SAS.

@michaelkilhullen
Copy link
Contributor

You need to add the CST config statements to the SAS configuration file. SASHOME/SASFoundation/9.4/nls/en/sasv9.cfg.

@YDangPMC
Copy link
Author

I've addit to the sasV9 file, but I get the same result.
If I add csthome and classpath in windows as system environment variables I do get a path for csthome and classpath, but the cstgloballib and cstsamplelib are still empty.

Added in sasv9.cfg:
/* This is the ANSI character set (for SAS Monospace font and ANSI Sasfont) */
-FORMCHAR '82838485868788898A8B8C2B3D7C2D2F5C3C3E2A'x

-CSTGLOBALLIB C:\Users\Y.D.Dang_pc\Documents\SAS CST\cstGlobalLibrary
-CSTSAMPLELIB C:\Users\Y.D.Dang_pc\Documents\SAS CST\cstSampleLibrary
-insert sasautos '!CSTHOME/macros'
-JREOPTIONS (-Dsas.app.class.dirs=!CSTHOME/jar)
/---------------------------------------------------------------
| WARNING: INSTALL Application edits below this line. User |
| options should be added above this box comment. |
| INSTALL Application maintains and modifies the |
| following options; -SASAUTOS, -SASHELP, -SASMSG, |
| -PATH, and -MAPS. It also maintains and modifies |
| the following CONFIG variables with the -SET option; |
| INSTALL, USAGE, LIBRARY, SAMPSIO, SAMPSRC, SASCBT, |
| and SASEXT01-SASEXT50. It preserves all lines above |
| the line containing 'DO NOT EDIT BELOW THIS LINE'. |
---------------------------------------------------------------
/

/* DO NOT EDIT BELOW THIS LINE - INSTALL Application edits below this line /
/
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

SAS log:
25 GOPTIONS ACCESSIBLE;
26 %put %sysget(CSTHOME);
C:\Users\Y.D.Dang_pc\Documents\SAS CST\cstFrameworkLibrary
27 %put %sysget(CLASSPATH);
C:\Users\Y.D.Dang_pc\Documents\SAS CST\jar
28
29 proc options
30 option=cstgloballib
31 option=cstsamplelib
32 option=sasautos
33 option=jreoptions;
34 run;

SAS (r) Proprietary Software Release 9.4  TS1M6

CSTGLOBALLIB= Specifies the location of the SAS Clinical Standards Toolkit global library.
CSTSAMPLELIB= Specifies the location of the SAS Clinical Standards Toolkit sample library.
SASAUTOS=SASAUTOS Specifies the location of one or more autocall libraries.
JREOPTIONS=( -DPFS_TEMPLATE=C:\Program Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\qrpfstpt.xml
-Djava.class.path=C:\PROGRA1\SASHome\SASVER1\eclipse\plugins\SASLAU1.JAR -Djava.security.auth.login.config=C:\Program
Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\sas.login.config -Djava.security.policy=C:\Program
Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\sas.policy -Djava.system.class.loader=com.sas.app.AppClassLoader
-Dlog4j.configuration=file:/C:/Program%20Files/SASHome/SASFoundation/9.4/tkjava/sasmisc/sas.log4j.properties
-Dsas.app.class.path=C:\PROGRA
1\SASHome\SASVER1\eclipse\plugins\tkjava.jar -Dsas.ext.config=C:\Program
Files\SASHome\SASFoundation\9.4\tkjava\sasmisc\sas.java.ext.config
-Dsas.jre.libjvm=C:\PROGRA
1\SASHome\SASPRI1\9.4\jre\bin\server\jvm.dll
-Dtkj.app.launch.config=C:\PROGRA
1\SASHome\SASVER~1\picklist -Xms128m -Xmx128m )
Specifies the Java Runtime Environment options for SAS.

@YDangPMC
Copy link
Author

Maybe of additional note I use the sasv9.cfg in the u8 file.
In the C:\Program Files\SASHome\SASFoundation\9.4\sasv9.csf file I've specified: -config "C:\Program Files\SASHome\SASFoundation\9.4\nls\u8\sasv9.cfg" instead of 'en'
But if I add the config statements to the u8 sasv9.cfg file then I get an error 'A connection to the server could not be established'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants