+ Reply to Thread
Results 1 to 3 of 3

Thread: 2004-06-23 is an invalid *ISO date???

  1. #1

    Default 2004-06-23 is an invalid *ISO date???

    Doug, Looks like your code should work. I suspect the problem is elsewhere. Are you sure that your DS is overlaying the Buffer in the Right place? The Offset to the new record image (in positions 65-68 of the First Trigger Parm) is Zero based. So you'll need to add 1 for the starting position of the Overlay. Also make sure that you've defined the Parm large enough to accept the Header Info, Before and After Record Images and the Null Maps. Just so you can compare, I've included the D specs that we use for defining Trigger parms in one of our Trigger pgms. Mike
    Code

  2. #2
    DougCMH Guest

    Default 2004-06-23 is an invalid *ISO date???

    Given this code... EnteredDate = %char(New.ELENTERED:*usa); Where New.ELENTERED (an *ISO date datatype field) contains d'2004-06-23' in *ISO format, and EnteredDate is a 10-char alpha field. This line is crashing with an "Invalid Date, Time or Timestamp" error. Why? 2004-06-23 seems like a valid date to me. Some other facts... - This is a V5R2 *AFTER *INSERT system trigger program. - New.ELENTERED is in a qualified DS that overlays the trigger buffer's new image area. - The triggered file was created with CREATE TABLE, where ELENTERED is a DATE datatype. - This is not an SQLRPGLE program. RPGLE only. - datfmt(*iso) is specified in the H-Specs. - This program uses native i/o to access another table (CREATE TABLE) that has a date field. The i/o fails on READE with the same "Invalid Date, Time or Timestamp" error, even though that date field contains a valid date. I'm obviously missing something simple. What is it?

  3. #3
    DougCMH Guest

    Default 2004-06-23 is an invalid *ISO date???

    The buffers are laid out correctly. Everything was fine once I moved the date to a field not in a qualified data structure. It looks like %CHAR cannot handle date fields in a qualified data structure (BASED or otherwise). All sorts of wonky things happen. I'm probably missing a PTF - you wouldn't happen to know the PTF number off hand, would you?

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 08-19-2004, 03:20 PM
  2. Replies: 0
    Last Post: 08-19-2004, 11:31 AM
  3. Changing Invalid date message
    By gary.shipp@s3t.co.uk in forum RPG
    Replies: 1
    Last Post: 08-04-2004, 05:23 AM
  4. PartnerWorld 2004: On Demand and Outsourcing
    By Guest.Visitor in forum Analysis of News Events
    Replies: 3
    Last Post: 03-09-2004, 11:02 PM
  5. Replies: 7
    Last Post: 07-03-2003, 11:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts