× 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.



If you need to pass a timestamp, pass it as character (no way). RPG only
handles the *ISO format.
Beginnin with release 7.2 you may be able to define a timestamp in RPG with
0 to 12 micro seconds:

DCL-S YourTimestamp0 Timestamp(0);
DCL-S YourTimestamp3 Timestamp(3);
DCL-S Your Timestamp6 Timestamp;
DCL-S yourTimestamp12 Timestamp(12);

With embedded SQL it is possible to convert a real timestamp into almost any
character representation of a timestamp.

Exec SQL Set :CharTimestamp = VarChar_Format(:YourTimestamp, 'YYYY-MM-DD
HH24:MI:SS');

It is also possible to convert a character timestamp into real timestamp:
Exec SQL Set :YourTimestamp = Timestamp_Format(:CharTimestamp, 'YYYY-MM-DD
HH24:MI:SS');

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"


-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Jim
Franz
Gesendet: Tuesday, 19.1 2016 20:43
An: RPG programming on the IBM i (AS/400 and iSeries)
Betreff: Trading timestamps with DB2 LUW

(Posting to RPG list due to RPGLE web service program to pass timestamp as
parm)
I have a requirement to pass timestamp in a format where I don't see RPGLE
has an option other than generating a text field.
This is the sample provided and through SOAPUI it works
<uws:StartDate>2015-12-08T14:26:46</uws:StartDate>

Every variation I try fails, and I have verified on the target system it is
a "TIMESTAMP".
2015-12-08-14.26.46 fails - (nothing selected)
2015-12-08-14.26.46.000 and .000000 both fail

Am I missing some understanding of timestamps between DB2 for i and DB2 LUW
(and this is either Linux or unix running Websphere with DB2 9.7.x) or is
there some edit possible in a timestamp?
ILE RPG Reference V7R1 says a Timestamp Data Type is always length of 26 and
format is yyyy-mm-dd-hh.mm.ss.mmmmmm

Jim
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.