Author Topic: Date Format Error  (Read 1659 times)

adeel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Date Format Error
« 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?

Greg Ira

  • Full Member
  • ***
  • Posts: 238
    • View Profile
Re: Date Format Error
« Reply #1 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

adeel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Date Format Error
« Reply #2 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.

Greg Ira

  • Full Member
  • ***
  • Posts: 238
    • View Profile
Re: Date Format Error
« Reply #3 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.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2145
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Date Format Error
« Reply #4 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.
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

adeel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Date Format Error
« Reply #5 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.

greghidalgo

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Date Format Error
« Reply #6 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.
#odiseries #iOS

Darrell Bryant

  • Jr. Member
  • **
  • Posts: 93
  • Sed fugit interea fugit inreparabile tempus-Virgil
    • View Profile
Re: Date Format Error
« Reply #7 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            */
#IBMi #iSeries #PDF #XML #400 Indexer #ASM

Stephen McNulty

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Date Format Error
« Reply #8 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.
#ISERIES #ODWEK #XML

adeel

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Date Format Error
« Reply #9 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.