IBM Support

"Unable to read from offset" error when loading line data into OnDemand

Question & Answer


Question

Loading line data into IBM® Content Manager OnDemand server, the error "Unable to read from offset" is thrown. How can I resolve this error?

Cause

The error means that the ACIF indexer cannot read the entire length from the offset specified. The length and offset added together should equal the original input file size, since CONVERT=NO is specified, but ACIF is attempting to read past the size of the input file.

An example of such an error is:

arsload: 08/14/09 07:47:59 -- Indexing started, 7760 bytes to process
0425-415 CC=YES
0425-415 CCTYPE=Z
0425-415 CONVERT=NO
0425-415 CPGID=850
0425-415 MCF2REF=CPCS
0425-415 TRC=NO
0425-415 FILEFORMAT=STREAM,(NEWLINE=X'0D0A')
0425-415 TRIGGER1=*,1,X'31',(TYPE=GROUP)
0425-415 FIELD1=2,6,1
0425-415 FIELD2=1,11,6,(TRIGGER=1,BASE=0)
0425-415 FIELD3=1,2,8,(TRIGGER=1,BASE=0)
0425-415 INDEX1=X'50726F64756374',FIELD1,(TYPE=GROUP,BREAK=YES)
0425-415 INDEX2=X'42696E',FIELD2,(TYPE=GROUP,BREAK=YES)
0425-415 INDEX3=X'7264617465',FIELD3,(TYPE=GROUP,BREAK=YES)
0425-415 DCFPAGENAMES=NO
0425-415 UNIQUEBNGS=YES
0425-415 IMAGEOUT=ASIS
0425-415 INDEXOBJ=GROUP
0425-415 INDEXSTARTBY=1
0425-415 INSERTIMM=NO
0425-415 RESTYPE=NONE
0425-415 inputdd=C:\myinpufilehere.ard
0425-415 outputdd=NUL
0425-415 indexdd=.\myinpufilehere.ind
0425-415 resobjdd=NUL
0425-440 ACIF AT PK74886 HAS COMPLETED NORMALLY WITH RETURN CODE 0.

arsload: 08/14/09 07:47:59 Indexing completed
arsload: 08/14/09 07:47:59 -- Loading started, 7760 bytes to process
Unable to read from offset 5175 for length 2587 from the file: C:\myinpufilehere.ard

Loaded 0 rows into the database

arsload: 08/14/09 07:47:59 Loading failed
arsload: Processing failed for file >myinpufilehere.ard<
arsload: Processing has stopped.  The remaining files will NOT be processed.

Answer

If CONVERT=NO is specified in your ACIF indexing parameters and no ACIF input user exit is used, every line must end with the newline character(s) specified in the ACIF indexing parameters. In the example from the Cause section, the NEWLINE characters, X'0D0A', were missing from the last line in the input file.

When using ACIF with OnDemand, after indexing has completed successfully for line data, a .ind and .out file is left for the OnDemand arsload program to load data into the OnDemand server. The .ind file contains index values and associated references to the offsets and lengths of each document ACIF indexed from the original input file. The .out file typically would contain the document data to load after processed by ACIF. Since CONVERT=NO is configured, arsload loads the input file, not the .out file generated, based on the assumption that the input file and .out files are identical.They should be identical, however, the .out file is still created internally by ACIF, and the bytes of the .out file are counted in order to create the lengths and offsets in the .ind file.

When ACIF creates the .out file, it adds the newline character(s) to every line. Therefore, the .ind file will indicate that the.out file is longer than the input file really is if the original input file does not contain the newline character(s) after each line.

[{"Product":{"code":"SSEPCD","label":"Content Manager OnDemand for Multiplatforms"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Loading Data","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF025","label":"Platform Independent"},{"code":"PF033","label":"Windows"}],"Version":"8.4;8.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21219326