Author Topic: ARSLOAD Syntax for Using File Name to Index  (Read 3668 times)

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
ARSLOAD Syntax for Using File Name to Index
« on: June 21, 2017, 03:41:56 PM »
I have a CMOD AIX v.9.0.0 server test system.

I am trying to load a PDF file with the following file name:

CUSTOMS.2061509336.006-26629385.231-3459008-7.E063483589.pdf

I am trying to use the following ARSLOAD command:

./arsload -v -I ondt -d /ondemand/monitor/customs –b “1,EXPEDITORNO” -b "2,AWBBLNO" -b "3,CUSTOMSNO" -b "4,INVOICENO" –B “AG.1FLD.2FLD.3FLD.4FLD” -u ondt -p /opt/IBM/ondemand/V9.0/config/ars.stash

The command successfully finds the file in the directory and tries to process it.

My App Group and Application are both called CUSTOMS.  I have four index fields in the App Group that match the -b parameters.  I've tried different variations of the -B parm but continue to get errors. Either ARS4331E or it tries to match the second part of the name to the App Group and fails, adding the .FAILED extension on the file.

From this information, can someone help me define this command properly?  Maybe it is my incorrect use of the -B parm?

Thanks,
Joe
#Installation #Upgrade #Migration #Administration #Integration #Customization #Training, and more!

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

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: ARSLOAD Syntax for Using File Name to Index
« Reply #1 on: June 22, 2017, 05:29:33 AM »
Any chance you tried the following?
-G FORMS –B “FOR.1FLD.2FLD.3FLD.4FLD”
or just
–B “FOR.1FLD.2FLD.3FLD.4FLD”    since CMOD defaults to the forms field.

I've had similar issues as you and for some reason this seemed to clear it up.

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
Re: ARSLOAD Syntax for Using File Name to Index
« Reply #2 on: June 22, 2017, 07:00:20 AM »
Ira,

Thanks for the suggestion.  I tried both versions of your syntax.  I now consistently identifies the App Group as CUSTOMS but send error:
ARS4331E Unable to add another index field to the data. Data may be fully composed or otherwise already indexed.

I double checked the spelling of the 4 index fields that they match the names defined in the App Group.  I also have defined two other fields:
RPTDATE - segment date defaulted to 't'
APPLID - application id field

The CUSTOMS Application is defined to use 'Generic' Indexer.

Any other ideas?  I'll try them.
#Installation #Upgrade #Migration #Administration #Integration #Customization #Training, and more!

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

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: ARSLOAD Syntax for Using File Name to Index
« Reply #3 on: June 22, 2017, 12:59:39 PM »
What do you have in the .ind file when you submit the file to load?

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
Re: ARSLOAD Syntax for Using File Name to Index
« Reply #4 on: June 22, 2017, 01:35:27 PM »
I do not have an .IND file. My understanding of using the -b and -B flags was that OnDemand would extract the index data from the different parts of the file name, map these parameters to the index fields specified and index the file.
Is there more to it than that?
#Installation #Upgrade #Migration #Administration #Integration #Customization #Training, and more!

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

Lars Bencze

  • Full Member
  • ***
  • Posts: 116
  • CMOD Expert at Skandia
    • View Profile
    • INACTIVE - Bezland Consulting
Re: ARSLOAD Syntax for Using File Name to Index
« Reply #5 on: June 29, 2017, 04:32:59 AM »
I asked a similar question once to IBM (or was it here on the ODUG Forum?), and I was told that the -B simply does not work when you have Generic indexing selected. D'oh.  :o
That did not quite make sense to me, but the ability to handle "-b" is apparently only built into the other indexing engines.
OnDemand for MP expert. #Multiplatforms #Admin #Scripts #Performance #Support #Architecture #PDFIndexing #TSM/SP #DB2 #CustomSolutions #Integration #UserExits #Migrations #Workflow #ECM #Cloud #ODApi

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
Re: ARSLOAD Syntax for Using File Name to Index
« Reply #6 on: June 29, 2017, 06:44:00 AM »
I was told by IBM support that the -B parameter when used with the Generic indexer could only be used to ADD indexing.  This means that I have to create a .IND file with the same name as the .PDF that I want to load and it must contain at least 1 index name/value pair (could be a dummy field name) and the FILENAME value must include the name of the PDF file.
I tested this method on a different v.9.5.0.6 system and got it to work.  Here is the file name and text I had to add to the .IND file
CUSTOMS.2061509336.006-26629385.231-3459008-7.E063483589.pdf.ind (the name must be the input file appended with .ind)

COMMENT: OnDemand Generic Index File Format
CODEPAGE:1208
GROUP_FIELD_NAME:docname   - this is a dummy field. But you must have one field. Otherwise, PDF indexer will error out.
GROUP_FIELD_VALUE:TEST PDF
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:CUSTOMS.2061509336.006-26629385.231-3459008-7.E063483589.pdf

This adds a lot of customization to create a program to create these custom IND files that really serve no added function. 
#Installation #Upgrade #Migration #Administration #Integration #Customization #Training, and more!

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