I have a challenge with ARSDOC GET:
I want to retrieve all documents from ApplGroup=PDBREVE, and write them into a directory with unique names for all documents.
If I use this parm ?o ?(Senr)? , documents with same <Senr> gets overwritten:
-o "(Senr)" -
-a -
-i "where Ordning='PD' -
AND Listenummer = '449702' -
AND Dato between 1199232000 and 1209167999 "
I tried to add the field Dato: ?o ?(Senr) (Dato)?
But because there is a blank between date and Time ARSDOC refuses to write the file, even though it is allowed in Unix
Same problem with Listenummer that contains blanks.
I also tried to combine ?o ?(Senr)? -c But that is not allowed by ARSDOC.
The -c or -g flag cannot be used when an output file name contains database field names.
If it was possible to use the internal OD date it would have been the solution.
Has anyone an idea how to name all documents unique ?
The fields I canuse are defined like this:
<Dato> Date/time (TZ) example: 26-04-2008 04:51
<Listenummer> String( 11 ) example: ? 444702?
<Senr> String( 8 ) example ?12345678?
Reards Ib Marthin
Did you try using .SEQ? -o "(SENR)".SEQ
Yes. Because <Senr> is a database field name arsdoc writes this message:
" The -c or -g flag cannot be used when an output file name contains database field names."
I'm a little confused. Did you want to use -c or -g? If not .SEQ should do want you want.
Here's what I ran in a test:
-o "(LPAR)".SEQ
-i "WHERE REPORT_DATE = 14519"
This produced 6 documents. LPAR is one of my fields and in this case resolved to TEST1
The documents produced were:
TEST1.1
TEST1.2
TEST1.3
TEST1.4
TEST1.5
TEST1.6
Is this not what you wanted? I could be reading your question wrong.
No that was just another try - sorry.
But if I use these parms:
-L 10 -
-d /SYSTEM/var/TEST/PDBREVE/443768 -
-G 'PDBREVE' -
-n -
-o "(Senr)".SEQ -
-a -
-i "where Ordning='PD' -
AND Listenummer = '443768' -
AND Dato between 1199145600 and 1209167999 "
I get this message:
The output filename format is invalid. Syntax is as follows (Parentheses are required):
(ag_name1)(ag_name2)(ag_name3)
If I omit the .SEQ I get 10 documents (if there is no duplets).
Looks like the .SEQ is unique to 8.5 which we're running, I'm guessing you're on a different version.
You're right - I was pointing to arsdoc in old /bin.
In 8.5.0 it works.
So thanks anyway :-)