I don't know how to find that jar location. I'm using licensed SAS. Log: 1 The SAS System 14:30 Tuesday, September 27, 2016 NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead. NOTE: All profile changes will be lost at the end of the session. NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.4 (TS1M2) NOTE: This session is executing on the Linux 2.6.32-573.22.1.el6.x86_64 (LIN X64) platform. NOTE: Updated analytical products: SAS/STAT 13.2 SAS/ETS 13.2 SAS/OR 13.2 SAS/IML 13.2 NOTE: Additional host information: Linux LIN X64 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64 Red Hat Enterprise Linux Server release 6.7 (Santiago) You are running SAS 9. Some SAS 8 files will be automatically converted by the V9 engine; others are incompatible. Please see http://support.sas.com/rnd/migration/planning/platform/64bit.html PROC MIGRATE will preserve current SAS file attributes and is recommended for converting all your SAS libraries from any SAS 8 release to SAS 9. For details and examples, please see http://support.sas.com/rnd/migration/index.html This message is contained in the SAS news file, and is presented upon initialization. Edit the file "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: SAS initialization used: real time 0.07 seconds user cpu time 0.01 seconds system cpu time 0.02 seconds memory 3664.09k OS Memory 4504.00k Timestamp 09/27/2016 02:30:01 PM Step Count 0 Switch Count 8 Page Faults 0 Page Reclaims 4186 Page Swaps 0 Voluntary Context Switches 257 Involuntary Context Switches 2 Block Input Operations 0 Block Output Operations 24 1 /* using groovy to parse json into sas */ 2 proc 2 ! groovy; 2 The SAS System 14:30 Tuesday, September 27, 2016 3 4 4 ! add classpath="/(company)/projects/dev/ucf/bal/groovy-all-2.3.7-groovydoc.jar"; NOTE: The ADD CLASSPATH command completed. 5 6 /* showing proc groovy where my json java files are */ 7 7 ! submit; 7 ! /* starting groovy */ 8 9 import org.json.JSONObject 10 import org.json.XML 11 import java.io.File 12 import java.io.PrintWriter 13 14 /* loading json from file */ 15 def json_string = new File("/(company)/projects/dev/ucf/bal/test.json").text 16 17 /* converting json to xml */ 18 def json = new JSONObject(json_string) 19 def xml = XML.toString(json) 20 21 /* saving to file */ 22 def out = new PrintWriter("/(company)/projects/dev/ucf/bal/output_xml.xml") 23 24 /* adding xml headers */ 25 out.println("<xml>", xml, "</xml>") 26 27 out.close() 28 29 endsubmit; ERROR: The SUBMIT command failed. org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 2: unable to resolve class org.json.JSONObject @ line 2, column 9. import org.json.JSONObject ^ Script1.groovy: 3: unable to resolve class org.json.XML @ line 3, column 3. import org.json.XML ^ 2 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:860) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:521) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:497) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:292) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:727) at groovy.lang.GroovyShell.parse(GroovyShell.java:739) at groovy.lang.GroovyShell.parse(GroovyShell.java:766) at groovy.lang.GroovyShell.parse(GroovyShell.java:757) 30 quit; NOTE: The SAS System stopped processing this step because of errors. 3 The SAS System 14:30 Tuesday, September 27, 2016 NOTE: PROCEDURE GROOVY used (Total process time): real time 1.54 seconds user cpu time 0.00 seconds system cpu time 0.01 seconds memory 79.78k OS Memory 4504.00k Timestamp 09/27/2016 02:30:03 PM Step Count 1 Switch Count 0 Page Faults 0 Page Reclaims 106 Page Swaps 0 Voluntary Context Switches 557 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 0 ERROR: Errors printed on page 2. NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 1.63 seconds user cpu time 0.02 seconds system cpu time 0.03 seconds memory 3845.90k OS Memory 4504.00k Timestamp 09/27/2016 02:30:03 PM Step Count 1 Switch Count 10 Page Faults 0 Page Reclaims 4542 Page Swaps 0 Voluntary Context Switches 843 Involuntary Context Switches 2 Block Input Operations 0 Block Output Operations 40
... View more