Using JREPORT with a date/time span (DTESTAMP), how can I obtain the date/times I want?
Firstly, the DTESTAMP field is in ANSI standard SQL format. Therefore, if you have the SQL option, you need to convert the date you need from Julian to a hex value.
In OCF, in the SYSTEM dictionary, run this SELECT statement to find the hex value for the date May 21, 2007:
SELECT HEX(TIMESTAMP('2007-05-21-01.00.00.0000')) FROM SYSTEM.TABLE;
Here's an example of JREPORT using the DTESTAMP syntax:
SEL DTESTAMP EQ = (X'0165D200E1000000')
If you don't have the SQL option, you would need to call IDMSIN01 Parameter 5:
This converts an 8 byte internal time stamp to 26 character display format.
An example of this is available in the DML Reference COBOL Manual on pages D-13-14. The dates are stored in ANSI Standard SQL datetime stamp format. The number is in hex represents the number of days since January 1. 0001 for the date plus hours, minutes, seconds and micro seconds for the time. The number is unreadable as is.
See Advantage CA-IDMS Callable Services r16 SP2 Chapter 2 for more information on IDMSIN01.
See Advantage CA-IDMS Report r16 SP4 Chapter 8 for more information on the JREPORT reports and syntax.