How do I create an Excel workbook object in PeopleTools 8.54? - peoplesoft

I'm working on a project to write invoices to an excel workbook in PeopleSoft 9.2 using PeopleTools 8.54. In our old version (8.49) we did this:
&oWorkApp_Inv = CreateObject("COM", "Excel.Application");
&oWorkApp_Inv.DisplayAlerts = "False";
&oWorkBook_Inv = ObjectGetProperty(&oWorkApp_Inv, "Workbooks");
Doing the same in 8.54, I get an error that the application class COM is not found. I've researched through PeopleBooks and it suggested doing exactly what I'm doing, even with COM as the class. What can I do to fix this, and in what package can I find COM?

The two requirements for using the COM object are:
The server is running Windows
Excel is installed on the server
I created an App Engine is 8.54.13 and it ran successfully on my PSNT process scheduler.
Local object &excel;
&excel = CreateObject("COM", "Excel.Application");
&excel.quit();

Related

Load h5 keras model file in R

I'm building a R package for binary classification and I'm using opencpu to host it. Currently I've saved the h5 file as .RData file(serialized), which is then loaded in the environment using the .onLoad() function in R. This enables the R script to use the environment variable to load keras model using keras::unserialized_model().
I've tried directly using keras::load_model_hdf5() in the code, but after building and deploying on opencpu, when I try to hit the prediction API, I get error
ioerror: unable to open file (unable to open file: name = '/home/modelfile_26feb.h5', errno = 13, error message = 'permission denied', flags = 0, o_flags = 0)
I have changed permission for the file(777) and even the groups but still getting the error.
I even tried putting the file in inst/extdata folder so that it gets in the package but still same error.
Can anyone help on this, or suggest some alternative to load the h5 model directly?
Which OS does OpenCPU run on? Why does it try to write in /home/, this is very unusual? The best solution is to adapt your code to write in getwd() or tempdir(). Even better is to store data in a local database or redis server and let R read it from there, so you don't need disk access at all.
If you run on Ubuntu Server, reading from /home/ is not permitted by default. If you want to allow this, you need to add apparmor rules, see section 3.5 of the server manual.
Some relevant topics from the opencpu mailing list:
write in home dir: https://groups.google.com/d/msg/opencpu/5vRvgSKY-qE/4xMzZCGJBAAJ
keras in opencpu: https://groups.google.com/d/msg/opencpu/HhRzFVVFdaA/n5Nu1sxyFgAJ
write tmp folder: https://groups.google.com/d/msg/opencpu/Y1tYhaQUzwU/ubSEd_CDCgAJ

How to create a table in SQL Server using RevoScaleR?

I'd like to able manage table on SQL Server via my R script and RevoScaleR library.
I have Machine Learning Services installed on a local instance and Microsoft R Client as an interpreter for R. I can get a connection to the server.
However, it seems, I can't create a table on the server.
I've tried:
> predictionSql = RxSqlServerData(table = "PredictionLinReg", connectionString = connStr)
> predict_linReg = rxPredict(LinReg_model, input_data, outData = predictionSql, writeModelVars=TRUE)
...which returns:
Error in rxCompleteClusterJob(hpcServerJob, consoleOutput,
autoCleanup) : No results available - final job state: failed
Help would be appreciated. New to R.

Read NACHA Formatted File using ChoETL DLL Not Working in SSIS package

I have Used ChoETL.dll and ChoETL.NACHA.dll to read NACHA Formatted file VS2015 C# console and it is working fine.
Created an exe for this console application.
Called the EXE in SSIS package using "Execute Process Task". But it is throwing the below Error.
Message :Failed to parse line to 'ChoETL.NACHA.ChoNACHABatchHeaderRecord' object.
Filename :Sample.txt
StackTrace : at ChoETL.ChoManifoldRecordReader.LoadLine(Tuple`2 pair, Object& rec)
at ChoETL.ChoManifoldRecordReader.<AsEnumerable>d__10.MoveNext()
at ChoETL.ChoManifoldReader.Read()
at ChoETL.NACHA.ChoNACHAReader.<>c__DisplayClass14_0.<GetEnumerator>b__0()
at ChoETL.NACHA.ChoNACHAReader.ChoNACHAEnumeratorWrapper.ChoEnumeratorWrapperInternal`1.MoveNext()
at ChoETL.NACHA.ChoNACHAReader.ChoNACHAEnumeratorWrapper.<BuildEnumerable>d__0`1.MoveNext()
at NachaReader.Program.Main(String[] args
Can any one provide solution to resolve this issue. or suggest any other way to Read NACHA formatted file in SSIS package.

Instantiating RInScala results in NoSuchMethodError

I'm trying to integrate R into Scala using JVMR. I am getting a NoSuchMethodError when attempting to instantiate RInScala.
I'm working on a Windows 7 machine with R installed under C:\Program Files\R\R-3.1.1 and Scala version 2.11.1 is installed under C:\Program Files (x86)\scala. I'm developing in IntelliJ with the Scala plugin and am using the Scala worksheet just to test this out as a POC. My Scala project does show JVMR 2.11-2.11.1.1.jar as an included library. The worksheet is very basic at present - just the import and the instantiation attempt.
import org.ddahl.jvmr.RInScala
val R = RInScala()
When running the worksheet in IntelliJ, I see the following output, so I can tell that it's successfully importing the class, but can't instantiate.
import org.ddahl.jvmr.RInScala
java.lang.NoSuchMethodError: scala.runtime.ObjectRef.create(Ljava/lang/Object;)Lscala/runtime/ObjectRef;
at org.ddahl.jvmr.RInScala$.findROnWindows(RInScalaTest.sc2318647708135405919.tmp:804)
at org.ddahl.jvmr.RInScala$.defaultExecutable$lzycompute(RInScalaTest.sc2318647708135405919.tmp:822)
at org.ddahl.jvmr.RInScala$.defaultExecutable(RInScalaTest.sc2318647708135405919.tmp:821)
at org.ddahl.jvmr.RInScala.<init>(RInScalaTest.sc2318647708135405919.tmp:28)
at org.ddahl.jvmr.RInScala$.apply(RInScalaTest.sc2318647708135405919.tmp:838)
at com.xxxx.r_in_scala.A$A1$A$A1.R$lzycompute(RInScalaTest.sc2318647708135405919.tmp:2)
at com.xxxx.r_in_scala.A$A1$A$A1.R(RInScalaTest.sc2318647708135405919.tmp:2)
at com.xxxx.r_in_scala.A$A1$A$A1.get$$instance$$R(RInScalaTest.sc2318647708135405919.tmp:2)
at #worksheet#.#worksheet#(RInScalaTest.sc2318647708135405919.tmp:10)
I've drilled into the code for findROnWindows and my installation should be found based on the values of the registry keys that are being read. I'm sure I'm missing something simple, but am at that "I've been looking at the problem for too long without figuring it out and just need a new set of eyes" stage.
To my knowledge this is currently some kind of bug in the worksheet implementation by IntelliJ or indeed a misconfiguration. To verify:
Put your code in an object
package starter
object Test extends App {
import org.ddahl.jvmr.RInScala
val R = RInScala()
println("works")
}
and try to run it as a scala app and not from the worksheet.

MonoDevelop Error - System.DllNotFoundException: libclntsh.so

I have created a C# console project using Visual Studio 2008 and OracleClient (OCI) libraries to connect to a Oracle 11g database. This code works in Windows. I copied the whole project into Linux and Open the solution using MonoDevelop 4.2.3. But while running the project, the Database Open call throws an exception
string connectionString = "Data Source=Test; User ID=UID; Password=PWD"
OracleConnection conn = new OracleConnection()
conn.ConnectionString = connectionString;
conn.Open();
Exception:
System.DllNotFoundException: libclntsh.so at (wrapper
managed-to-native)
System.Data.OracleClient.Oci.OciCalls/OciNativeCalls:OCIEnvCreate
The libclntsh.so file is under the location /home/dbuser/instantclient_12_1
I have set the environment variable by adding the below in the /home/dbuser/.bashrc file and rebooted the system.
export
LD_LIBRARY_PATH=/home/dbuser/instantclient_12_1:$LD_LIBRARY_PATH
But still I am getting the same error. I couldn't find any option to include the Libraries in the MonoDevelop.
Thanks
Looks like LD_LIBRARY_PATH environment variable is not set up correctly or does not get applied.
Try creating additional linker configuration file instead with the following command:
echo /home/dbuser/instantclient_12_1 > /etc/ld.so.conf.d/instantclient.conf
Then as root update linker cache with command:
ldconfig
Restart MonoDevelop and try again.
I have resolved the issue by doing the following
echo $ORACLE_HOME/lib > /etc/ld.so.conf.d/dbconf.conf
set the$ORACLE_HOME, $ORACLE_INCLUDE_PATH and $ORACLE_LIB_PATH to
/etc/profile.d
Because of some reason MonoDevelop IDE is not picking the library libclntsh.so if I use the OCI client libraries

Resources