AS/400 Call PCML File From Java

649 Views Asked by At

I've been using ProgramCallDocument on eclipse as below, and it's working fine.

pcml = new ProgramCallDocument(as400, "pcml.file.getkursjav");

But, I want to call the PCML file using filepath like D:\xxx\xxx\, because the PCML file is in another directory. So, how can i using filepath to call the PCML file ?

PS : Currently, the PCML file is under the same java package.

2

There are 2 best solutions below

0
On

I think you have to escape the backslashes with another backslash.

pcml = new ProgramCallDocument(as400, "D:\xxx\xxx\");

https://docs.oracle.com/javase/tutorial/java/data/characters.html

0
On

I haven't tried this myself, but you might be able to load the PCML document from an input stream.

ProgramCallDocument(AS400 sys, String docName, InputStream docStream, ClassLoader loader, InputStream xsdStream, int type)