Author Topic: Doc by doc extract of AFP's  (Read 1238 times)

TRDFan

  • Guest
Doc by doc extract of AFP's
« on: September 15, 2021, 12:22:04 PM »
Turning the corner on being completely done with a migration, off of CMOD.

Have a few application groups that our vendor is having issues with their extract utility, it's pulling the doc, but when "they" convert it to PDF - it's blank. No ideas why.

This migration will be wrapped up and we will be off of CMOD within the next few weeks, so my management asked if we can just extract all the data from CMOD, as AFP..and basically archive it somewhere. If a document is really needed, they will take that AFP, and "convert it" when needed. They are looking at storing all this stuff on tapes.

Doc by doc retrieval is very slow. How I usually get batches of docs, is something like this (Read from a list of fields extracted from the segment table. Below example, 2.4m rows)-

Code: [Select]
arsdoc get -u admin -p ondemand -h archive -v -G APPGROUP -c -i "where polno='${polno}' and rdate='${rdate}'" -o ./batch_$1/APPGROUP.${rdate}.${polno}.${docid}.${appid}
This is on AIX 6, CMOD 8.5, db2 9.7, so yes-It's old. And slow.

Are there any other viable options anyone can suggest?

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
Re: Doc by doc extract of AFP's
« Reply #1 on: September 16, 2021, 11:23:32 AM »
I had a similar situation of needing to unload many files for a migration.  Instead of making many individual calls to ARSDOC Get that each require a logon, I first created a parameter file that contains -X LoadID references to all of the files I wanted to extract, then performed a single ARSDOC Get that referenced the parameter file.  This was much faster because it only performs a single logon for all of the records in the parameter file.  (I'm not sure this will work in your situation because you are not extracting by LoadId, but it may be worth looking at as an alternative).

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

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

TRDFan

  • Guest
Re: Doc by doc extract of AFP's
« Reply #2 on: September 17, 2021, 06:07:23 AM »
I had a similar situation of needing to unload many files for a migration.  Instead of making many individual calls to ARSDOC Get that each require a logon, I first created a parameter file that contains -X LoadID references to all of the files I wanted to extract, then performed a single ARSDOC Get that referenced the parameter file.  This was much faster because it only performs a single logon for all of the records in the parameter file.  (I'm not sure this will work in your situation because you are not extracting by LoadId, but it may be worth looking at as an alternative).

Joe

So in the parameter file you only used [-X loadid]    ... how did you handle the output file.

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
Re: Doc by doc extract of AFP's
« Reply #3 on: September 21, 2021, 08:40:58 AM »
Each row in my parameter file had the following parameters:
[-c] [-g] [-d /path/to/store/file] [-o uniquename] [-G AppGroupName] [-X 5517-1-0-6029FAA-20161026000000-20161026000000-5518]

-d is the directory to store the .OUT and .IND files
-o is a unique identifier I assigned from my program that built the parameter file

For a large migration, I was putting up to 1,000 rows per file.

I hope this helps.
Joe
#Installation #Upgrade #Migration #Administration #Integration #Customization #Training, and more!

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