[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LDM #TIY-968074]: pqact question



Michael,

> In a pqact EXEC statement which calls a script, how can I capture the size
> of the data file which triggers the pqact statement and pass that data file
> size to the script that is called?
> 
> For example, I have a pqact entry something like this:
> 
> EXP        ^(...*)               EXEC      perl
> /usr/local/ldm/util/script.pl \1
> 
> "\1" seems to hand the name of the data file to script.pl.  What other
> arguments are available?  How do I pass the data file size?

There's no way to do what you want with an EXEC action.  The PIPE action does 
have an (undocumented) "-metadata" option that passes binary metadata 
information to its decoder, but nothing like that is available to the EXEC 
action.

One workaround would be to have a "FILE -close" action just before the EXEC 
action that filed the same data-product.  The name of the file could be passed 
to the EXEC action, which could take the size of the file.

> Thanks,
> 
> Michael Johnson
> 
> National Weather Service

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: TIY-968074
Department: Support LDM
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.