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

Joe Wolken

  • Jr. Member
  • **
  • Posts: 51
  • 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.

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

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1681
  • 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?

#Install, #Educate, #Repair, #Upgrade, #Migrate, #Enhance, #Optimize.

IBM CMOD Professional Services:
Call:  +1-866-533-7742  or  eMail:

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SA #Performance #Security #Audits #Customizing #Availability #HA #DR #Training