Author Topic: ARSDOC Add API error when running a remote command  (Read 22 times)

Joe Wolken

  • Newbie
  • *
  • Posts: 35
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
ARSDOC Add API error when running a remote command
« 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.
Installation, Upgrade, Migration, Administration, Integration, Customization, Training, and more!

Call: 512-402-1123
email: wolkenj@oascorp.com 
Click: http://www.OASCorp.com

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1276
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: ARSDOC Add API error when running a remote command
« Reply #1 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.
#Install, #Educate, #Repair, #Upgrade, #Migrate, #Enhance, #Optimize.

Call:  +1-866-533-7742
Click:  http://JustinDerrick.com/
eMail:  jd@justinderrick.com
Wiki:  http://CMOD.wiki/

Interests:  #AIX6 #AIX7 #Linux #Multiplatforms #DB2v9 #DB2v10 #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #Training