|
Oops! Accidentally sent that too soon. Here's the whole thing -- Actually, EVAL fromdate:x 00000 F2F0F0F2 F0...... ........ ........ - 20020 would be consistent with FROMDATE P(8,0) not FROMDATE S(8,0) So maybe it's simply the compiler listing that's wrong? The intermediate source in QTEMP shows ELDATE as zoned: D SQL_00011 65 72S 0 ELDATE D SQL_00012 73 76S 0 ELTIMI C EVAL ELDATE = SQL_00011 C EVAL ELTIMI = SQL_00012 and ELDATE itself is in the externally-defined data structure, which presumably uses the external format, which is zoned-decimal. If I compile from the intermediate QTEMP source, the compile listing shows: 002400 d ERPLOG E DS extname(ERPLOG) 000001=D ELDATE 8S 0 000002=D ELTIMI 4S 0 and from the service program compiler listing: ELAPSEDHOU Field References: Field Attributes References (D=Defined M=Modified) FROMDATE S(8,0) 002300D 003200 003500 BASED(_QRNL_PST+) FROMTIME S(4,0) 002400D 003200 003600 BASED(_QRNL_PST+) THRUDATE S(8,0) 002500D 003300 003500 BASED(_QRNL_PST+) THRUTIME S(4,0) 002600D 003300 003600 BASED(_QRNL_PST+) So it all looks like it's passing zoned to zoned, except the SQL, which if Matt is correct, is passing packed decimal, but it's being converted to zoned and works fine. It's only the EVAL in the SQLRPGLE program that has a problem. Peter Dow Dow Software Services, Inc. 909 793-9050 voice 909 522-3214 cellular 909 793-4480 fax ----- Original Message ----- From: "Alexei Pytel" <pytel@us.ibm.com> Sent: Thursday, September 19, 2002 6:08 PM Subject: Re: Using SQL UDF in SQLRPGLE program gets decimal data error > > EVAL fromdate:x > 00000 F2F0F0F2 F0...... ........ ........ - 20020 > > This is consistent with > FROMDATE S(8,0) - 8 packed decimal digits require 5 bytes - > this is what debugger shows you. > > Now the difference between RPGLE and SQLRPGLE - I can only speculate that > SQL precompiler injects something, which changes the interpretation of some > variables. > You may check the output of SQL precompiler - by default it goes to > QTEMP/QSQLTEMP1.
As an Amazon Associate we earn from qualifying purchases.
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.