Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Johan Dahlgren

Pages: [1]
1
Tips and Tricks / Document size on disk i AFP format
« on: January 25, 2022, 06:24:14 AM »
Hello,

I am having problems with calculating the average size of the documents stored in OnDemand folders and application groups. I have been manually trying to match different sizes in the tables to match it to the actual size of the AFP file when written to disk outside of OnDemand.

We are working to convert our documents from AFP to PDF-A/2b and want an accurate way to estimate the time needed to do this. We are fetching the documents from OnDemand and writing them to disk in the AFP format, then we convert them using the AFP2PDF converter and finaly store them in a new storage.

I have been looking at the DOC_LEN in the tables named from the application group name (ARSAG, AGID_NAME) and combining that with the DECOMP_SIZE of the correlating resource from ARSRES table... for the most part it seems to give me the correct size of the file but when the resource DECOMP_SIZE is null the numbers are off. Examples below.

If i have a file with DOC_LEN of 2000 and that has a RESOURCE with a DECOMP_SIZE of 4000 the document size on disk will be 6000b

But if I have a file with DOC_LEN of 2000 and a RESOURCE with a DECOMP_SIZE of '-' the document size is not the expected 2000 but often much bigger even tho there is no DECOMP_SIZE.

Am i way off in what i try to do? Is there a better way to calculate the expected number of bytes a document will have once it is written to disk?

Kind regards
Johan Dahlgren

2
Hello,

I have a problem with dates in our ondemand. We have documents that we need to apply rules to according to their age, unfortunately some of the documents are missing this information. The date value is set to "-1568" for about 30 000 of the documents. My question is if there is a way to find out when these documents were loaded into Ondemand and use that date instead?

I have the following example.

Our application group from the table ARSAG
NAME                       AGID  AGID_NAME
Application group 1   6045   UGA

DB2 describe of table UGA1
Column name     Data type schema    Column Data type name   Length  Scale   Nulls
VALUE_1         SYSIBM              CHARACTER               12      0       No
DATE            SYSIBM              SMALLINT                2       0       No
VALUE_2         SYSIBM              CHARACTER               4       0       No
DOC_NAME        SYSIBM              VARCHAR                 11      0       No
DOC_OFF         SYSIBM              INTEGER                 4       0       No
DOC_LEN         SYSIBM              INTEGER                 4       0       No
COMP_OFF        SYSIBM              INTEGER                 4       0       No
COMP_LEN        SYSIBM              INTEGER                 4       0       No
ANNOT           SYSIBM              CHARACTER               1       0       No
COMP_TYPE       SYSIBM              CHARACTER               1       0       No
RESOURCE        SYSIBM              INTEGER                 4       0       No
PRI_NID         SYSIBM              SMALLINT                2       0       No
SEC_NID         SYSIBM              SMALLINT                2       0       No

I was hoping there was a way to connect the DOC_NAME to the NAME in ARSLOAD and get the date from there but I cant seem to find the correct NAME and AGID to correlate with the DOC_NAME in my table UGA1.

So in short, is there  a way to find out when a specific document in my UGA1 table was loaded?

3
Tips and Tricks / Best way to "select count" from ondemand?
« on: April 23, 2020, 07:20:29 AM »
Hello,

I have a question. What is the best way to do a sort of "select count" from ondemand?

Backstory: we want to know how many of a certain type of document we have in a folder. We have a folder, lets call it LETTERS, with about 25.000.000 documents. we want to know how many type 1 and how many type 2 documents are in that folder.

What I have tried so far:
I have tried using the ARSDOC QUERY command to do this, se example below, but is there a better way to do this?

command i have used:
arsdoc query -v -h <SERVER> -u <USER> -p <PASSWORD> -f "<FOLDER NAME WITH SPACES>" -i "where id LIKE '%' and type= 'one'" | wc -1

Any hints or tips would be greatly appreciated.

Regards,

Johan Dahlgren

Pages: [1]