OnDemand User Group

Support Forums => Report Indexing => Topic started by: adeel on February 23, 2021, 10:05:37 PM

Title: Date Format Error
Post by: adeel on February 23, 2021, 10:05:37 PM
Please can someone guide me as when I run the report on CMOD, it gives me error on Row 59:

Row 59:  The string " 0081  02-" could not be converted to a date from the format of %d/%m/%Y

The report developer says his report is in correct format. How can I clear this error or tell the developer the exact error for him to fix?
Title: Re: Date Format Error
Post by: Greg Ira on February 24, 2021, 06:23:32 AM
Your field for that index is pulling data from the wrong location on the report.  If it's truly trying to index a date you need to adjust your field parameters pick up that date.  It's clearly pulling a string from a different location and it isn't a date in the format of %d/%m/%Y
Title: Re: Date Format Error
Post by: adeel on February 27, 2021, 04:42:26 AM
Thanks Greg for the update. It parses till row 59. Date is right at the start. Firs field and index is date.
Title: Re: Date Format Error
Post by: Greg Ira on March 02, 2021, 07:15:49 AM
Since we haven't seen your indexing I would presume that in and around line 59 of your input data the indexer is finding the trigger you based that field off of.  check the definition for that trigger and see if it appears around line 59. eg if the field is set to FIELD1=2,11,10 then look 2 lines up from " 0081  02-" on record # 59.  If your trigger is found there you'll need to find a different trigger to base that date off of.
Title: Re: Date Format Error
Post by: Justin Derrick on March 02, 2021, 07:35:11 AM
My first guess is that there's a data quality issue.  Have you checked the report to see that the data is where you expect it to be on that 59th document?

-JD.
Title: Re: Date Format Error
Post by: adeel on March 02, 2021, 08:30:01 AM
Is there any debugger kind of thing in CMOD to check the data when it goes to row 59. The report is in house developed on iSeries.
Title: Re: Date Format Error
Post by: greghidalgo on March 02, 2021, 10:52:29 AM
Are you loading on an iSeries OD server ? 
If so, ADDRPTOND command can be run with Index Only - IDXONLY=*YES  and then you will get a .ind and .out file generated in your user profile's home directory if it exists.  If it does not exist, the files will go into the root directory.
If you are not on an iSeries, look into the command you are using - is there an index only option to produce the .ind/.out pair of files.?
In the .ind you will find what was picked up for all the fields defined, but as the error is indicating in the 59th report/document that is trying to be loaded, the data is incompatible with a date field.
Title: Re: Date Format Error
Post by: Darrell Bryant on March 02, 2021, 12:03:57 PM
If you are using the 400 Indexer, you can specify the field such that it is only located once in the first document of the report and the same value used in every document.  For example,

FIELD6=0,87,9,(TRIGGER=3,BASE=0,DEFAULT=X'6D5CC6C9D5C4D6D5C3C55C6D')    /* _*FINDONCE*_    */
INDEX6=X'C481A385',FIELD6,(TYPE=GROUP,BREAK=NO)                         /* Date            */
Title: Re: Date Format Error
Post by: Stephen McNulty on March 03, 2021, 06:24:04 AM
in response to "Is there any debugger kind of thing in CMOD"

use Update Application in the admin client, Indexer information, Modify with sample data (the spool file in question)

use the "toggle between display and add paramters" to highlight your index fields.  go to document 59, you should see that you are not picking up the date field as expected.
Title: Re: Date Format Error
Post by: adeel on March 04, 2021, 05:37:16 AM
Please refer attachment and toggle between display and parameters are highlighted. Date is same as of very first page which loaded successfully.