Author Topic: Identify the data/file type of the document retrieved using arsdoc get  (Read 3124 times)

mani

  • Guest
Hi,

I have a audit requirement to extract all the documents for a specific account numbers from CMOD across all the folders.

I am able to extract the metadata using "arsdoc query" and  documents using "arsdoc get" against the folders.

Since the folders have more than 1 application group/application mapped to it and the applications have different data types/file types ( PDF, CSV, DOC, Linedata etc), we want to have the output files created with their corresponding extensions or atleast have some reference in the IND file extracted using arsdoc query. This will help the auditors to open the files with the correct viewer/reader.

We are using CMOD 9.5.0.2 on RHEL 6.4 with DB2 10.5.7


Any suggestions/thoughts..


Happy New Year!!!


thanks
Mani




Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Identify the data/file type of the document retrieved using arsdoc get
« Reply #1 on: January 07, 2016, 03:12:37 AM »
Hello,

if you don't have a field for that in the application group... then you cannot do that with "arsdoc get/query" or at least I don't how to do it... :-D

What you can do, if you are on Unix/Linux, it's to use the command "file" to know which kind of file you are looking at... and then create some scripts to add the extension, and modify the index file.


OR

Create a java program that will simulate the "arsdoc get" and with it, you can extract each file, get the extension directly from the Java API, and do whatever you want with the file and the associated indexes...


Hope that helps a little bit for your problem.

Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2234
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Identify the data/file type of the document retrieved using arsdoc get
« Reply #2 on: January 07, 2016, 08:18:40 AM »
If you have different document types inside an Application Group, you can do an arsdoc get with the -i option (for an SQL query) and use the AGID field to distinguish between them.

If each Application Group only has one Application (ie, file type) then you have to do the same query for each Application Group (using the -G parameter) to arsdoc.

Don't forget to let us know how you solved your problem!

IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

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

mani

  • Guest
Re: Identify the data/file type of the document retrieved using arsdoc get
« Reply #3 on: January 07, 2016, 08:14:40 PM »
Thanks Alessandro and JNBC.

Since we are on Linux, I prefer using "file" command to get the file type in a script.

@ JNBC,

Each AG has more than 1 applications in it and hence we dont want to create a a generic index file and also dont want to store documents in 1 file as the auditors want the individual files.


thanks
Mani