OnDemand Users Group

Support Forums => CMOD for Multiplatforms => Topic started by: pankaj.puranik on January 04, 2013, 07:10:38 AM

Title: arsdoc query problem
Post by: pankaj.puranik on January 04, 2013, 07:10:38 AM
Hi

I am using the -i parameter to pass a sql to the arsdoc query.
My problem is that Iam not sure how to pass a date/time field.
I tried various combinations but the query simply does not return any results.

Here's the query :

/usr/lpp/ars/bin/arsdoc query -h host -i "where ReportDate = 20121113102042" -G AGName-v -u user -p password

The format in Application is defined as %Y%m%d%H%M%S
As you can see the report date is a DateTime field.
It is also being used as a segment field.

If I remove the report date and pass other parameters, it works.
Title: Re: arsdoc query problem
Post by: Justin Derrick on January 04, 2013, 12:38:12 PM
The Date/Time field in CMOD is represented as an integer.  It's equal to the number of seconds since January 1st, 1970 (exlcuding leap seconds if you want to get super-precise).

You can use arsdate to convert a date into this format.
Title: Re: arsdoc query problem
Post by: pankaj.puranik on January 05, 2013, 05:18:24 AM
Ya Justin. I was aware of it (arsdate). But here was what I had to do.
Since the field type was date time.
So I had to use arsdate -i. earlier I was just using arsdate -f. So the query was not returning results.

If the field type is date time zone, I have to use arsdate -z to get the date in arsdate format.