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



I recompiled the CL several times; the one included in the text is a simple
one-liner that only runs the RUNSQLSTM command, written yesterday.

I don't see any group PTFs specifically related to SQL - which do I need to
get?

TomH


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan Monselise
Sent: Tuesday, December 22, 2009 7:36 PM
To: Midrange Systems Technical Discussion
Subject: Re: Real strange RUNSQLSTM behavior

did you recompile the cl pgm?
did you look for any ptf for sql? on v5r4?
the source looks ok and run ok interactivly but maybe the compiled version
is not?
try

On Tue, Dec 22, 2009 at 6:32 PM, Tom <tomh@xxxxxxxxxxx> wrote:



This past weekend, we upgraded from v5r2 to v5r4. A RUNSQLSTM that we've
been executing for years is now acting up and I'm at a loss.



Here's the CL QRY003C:

RUNSQLSTM SRCFILE(RGPL/QUERYSRC) SRCMBR(ZFIELDTICK) COMMIT(*NONE)
ERRLVL(30)



Here's the SQL statements in ZFIELDTICK :



INSERT INTO LOCATION/FIELDTICK

SELECT

ALL 301 AS LOC,

(THTRANCN*1000000)+(THTRANMO*100)+THTRANDA+(THTRANYR*10000) AS

TICKDATE, T01.THCUSTNO, T02.CMNEWCUS, T01.THTICKNO,
T01.THTRANCN,

T01.THTRANYR, T01.THTRANMO, T01.THTRANDA, T01.THROUTNO,

T01.THPRIRTE, T01.THRBRNCH, T01.THCBRNCH, T01.THUSERID,

T01.THCSHCHG, T01.THPURORD, T01.THCSHRCV, T01.THTKTOTL,

T01.THPOSTCN, T01.THPOSTYR, T01.THPOSTMO, T01.THPOSTDA,

T01.THSETLCN, T01.THSETLYR, T01.THSETLMO, T01.THSETLDA,

T01.THORGTOT

FROM RAP300301/TICHIS T01,

RAP300301/CUSMAS T02

WHERE THCUSTNO = CMCUSTNO

AND( (THTRANCN*1000000)+(THTRANMO*100)+THTRANDA+(THTRANYR*10000) >

YEAR(CURRENT DATE-1 YEAR)*10000.+MONTH(CURRENT DATE-1
YEAR)*100.
+

DAY(CURRENT DATE-1 YEAR)

AND CMNEWCUS <> 0)





The Goodness:

If I execute the RUNSQLSTM from a command line, it runs perfect - file
FIELDTICK has 34604 records in just a few seconds

If I enter the SQL stmts into interactive SQL, it runs perfect - file
FIELDTICK has 34604 records in just a few seconds



The Badness:

When I run program QRY003C, the thing runs wild - generating many, many
thousands of duplicate entries. It'll run for hours, until we just kill
the
job.



Any ideas on what I should be looking at? Is this related to our v5r4
upgrade?



Tom Hightower




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






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.