OnDemand User Group

Support Forums => iSeries => Topic started by: Joe Wolken on May 08, 2017, 11:16:09 AM

Title: ARSDOC Add API error when running a remote command
Post by: Joe Wolken on May 08, 2017, 11:16:09 AM
Here is my problem:

I am testing my existing program (currently running on v.6.1) on a new v.7.1 OnDemand system, running OnDemand Server v.9.5.0.7.

If I run the following command from the QSH command line it runs successfully, (successfully adds and indexing the document).

arsdoc add -h QUSROND -u usradmin -p '/QIBM/UserData/OnDemand/QUSROND/ars.stash'
 -v -O -g RCVHDR -a RCVHDR -f RCVHDR -n "PROCDATE=4/5/17" -n "PONUM=''99999979''
" -n "VENDNUM=''99979''" -o /Upload/Temp/000F2AEZ.TIF

If I run the exact same command from within my Java program making remote program calls, I get the following error:

Character 'T' not valid following string '.         '.

Since I have the exact same program running successfully on v.6.1 but using -p password

If I change the -p parameter to the real password value (in place of the stash file name) then I get the following error:
Command ended normally with exit status 4.
Failed to Index

I have the USRADMIN userid defined in the stash file as both a User and the ARSLOAD user.

What is different about running the command in the QSH command line from running it remotely?

Thanks for any ideas.
Title: Re: ARSDOC Add API error when running a remote command
Post by: Justin Derrick on May 08, 2017, 08:37:21 PM
Sounds like a quoting issue around the last parameter, the file path.  I'm not familiar with Java, but maybe the /Upload/Temp/ is being interpreted as a command, not a string?  Alternately, make sure there aren't any tabs hiding in your text if you cut-and-pasted into your Java code.

Can we see the code (or just a snippet) you're trying to run if that's not proprietary?

-JD.