OnDemand User Group

Support Forums => iSeries => Topic started by: BHUMENY on March 28, 2017, 09:05:04 AM

Title: File Format of the files in the OUT file created by an ARSDOC GET Command
Post by: BHUMENY on March 28, 2017, 09:05:04 AM
I had previously asked this question in July 2016, but it did not get answered fully.

How can I tell what file type the file in the OUT file created by the ARSDOC GET command is?
We can currently store AFP, EML, PDF and TIFF documents in OnDemand in the same Application Group.  The EML, PDF and TIFF files are all stored using the same Application and the Generic Indexer.
When I retrieve a single document from this Application Group, how can I tell what file type it is and what viewer to use to open it or whether or not I need to transform it to PDF format before a Customer can view it?

Thanks in advance.
Bill
Title: Re: File Format of the files in the OUT file created by an ARSDOC GET Command
Post by: run8 on March 28, 2017, 09:32:59 AM
We can currently store AFP, EML, PDF and TIFF documents in OnDemand in the same Application Group.  The EML, PDF and TIFF files are all stored using the same Application and the Generic Indexer.

In this case I would create an application for each file type you're going to be storing, and specify the file extension in the application definition. That way the viewer will know what application to use. If there is something in the application group key for the documents already stored that will allow you to distinguish them you could change the applid field in your application to point to the correct application for that file extension.
Title: Re: File Format of the files in the OUT file created by an ARSDOC GET Command
Post by: Alessandro Perucchi on April 22, 2017, 06:50:28 AM
You must know what file format is behind your application, and therefore you will know what fileformat you have.
With the Java API from ODWEK, you can know that quite easily.
From the command ARSDOC GET, you don't... except to parse the metadata to know which Application the document comes from, and then parse the Application config to know what is the mime type of the corresponding file (OUT).