Author Topic: arsdoc query problem  (Read 3443 times)

pankaj.puranik

  • Guest
arsdoc query problem
« on: January 04, 2013, 12: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.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2231
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: arsdoc query problem
« Reply #1 on: January 04, 2013, 05:38:12 AM »
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.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

pankaj.puranik

  • Guest
Re: arsdoc query problem
« Reply #2 on: January 04, 2013, 10:18:24 PM »
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.