× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Using Carsten Flensburg's EXTJRNDTA tool, which creates an outfile from
DSPJRN and replaces the JOESD field (a string of the entire journaled
record) with the actual field definitions. I'm using that outfile in an
SQL INSERT statement, and need to convert the JODATE and JOTIME data from
the DSPJRN outfile to a timestamp that is a field in the INSERTed table.

When I run the query simply as a SELECT (no INSERT), the results are good.
When I slip the INSERT INTO TRG001H in front of it, the query (run either
from a program's RUNQRY statement or interactive SQL) throws CPF5035 (Data
mapping error on member QACXB94GHB) with the following detail:
Message . . . . : Data mapping error on member
QACXB94GHB.
Cause . . . . . : A data mapping error occurred on
field

Cast(TIMESTAMP_FORMAT(Translate(Cast(Concat(QACXB94GHB_1.JODATE,Cast(QACXB94
GHB_1.JOTIME AS Char(8) CCSID 37)) AS VarChar(14) CCSID
37),
*TBL),Translate('MMDDYYHH24MISS', *TBL),' -./,`';:','MMDDYYHH24MISS',37)
AS
TimeStamp) in record number 107, record format *FIRST, member number 1,
in
member QACXB94GHB file QACXB94GHB in library QTEMP, because of error
code
17. The error code meanings
follow:
<snip>
17 -- The format of the data in a date, time, or timestamp field is
not
valid.

The INSERT statement:
Insert into TRG001H
select timestamp_format( joDate || char(joTime ),
next value for TRG001Hseq, OD_OWNID, OD_FNAME
from qtemp/QACXB94GHB

The big surprise is how running the INSERT turned the function
timestamp_format( joDate || char(joTime ),
into
Cast(TIMESTAMP_FORMAT(Translate( Cast(Concat(QACXB94GHB_1.JODATE,
Cast(QACXB94GHB_1.JOTIME AS Char(8) CCSID 37))
AS VarChar(14) CCSID 37), *TBL),Translate('MMDDYYHH24MISS', *TBL),
' -./,`';:','MMDDYYHH24MISS',37) AS TimeStamp)
which might as well be Greek to me.

I have no clue how to debug this.

- Dan

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.