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



But then again not everyone is at v6.1 or higher ;)

Thanks,
Tommy Holden



From: "Birgitta Hauser" <Hauser@xxxxxxxxxxxxxxx>
To: "'Midrange Systems Technical Discussion'"
<midrange-l@xxxxxxxxxxxx>
Date: 10/07/2010 09:03 AM
Subject: AW: Statement gives error in RUNSQLSTM
Sent by: midrange-l-bounces@xxxxxxxxxxxx



RUNSQLSTM will not use anything past column 80...it truncates everything

Not quite true!
Beginning with Release 6.1 (or 7.1) RUNSQLSTM was enhanced by an option
MARGINS that allows to use SQL script past column 80.
(Default for MARGINS is 80, but can be enhanced up to 32754)

The following statement allows read and execute SQL code up to column 256
RUNSQLSTM SRCFILE(MYSRCLIB/QSQLSTMT)
SRCMBR(MYMBR)
COMMIT(*NONE)
MARGINS(256)

RunSQLSTM also allows to execute SQL Scripts within an Streamfile.

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: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von
Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Gesendet: Thursday, 07. October 2010 14:44
An: Midrange Systems Technical Discussion
Betreff: RE: Statement gives error in RUNSQLSTM

RUNSQLSTM will not use anything past column 80...it truncates everything
beyond that column...

Thanks,
Tommy Holden



From: Bryce Martin <BMartin@xxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 10/07/2010 07:40 AM
Subject: RE: Statement gives error in RUNSQLSTM
Sent by: midrange-l-bounces@xxxxxxxxxxxx



You know what. You nailed it. That was it. My source member is a .txt
but WDSC only lets you choose a length of 112. This morning when I opened


up WDSC the member opened up with truncated lines. Yesterday the local
copy was showing without the truncations. But after you close the member
and reopen it then you get the fresh look from the DB. Is there a way to
make a srcpf longer than 112? I thought you could make it much longer?


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



"Needles,Stephen J" <SNEEDLES@xxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/06/2010 03:06 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc

Subject
RE: Statement gives error in RUNSQLSTM






Is the statement too long for the source member? Does it run into a
comment portion of the line? Thus, resulting in part of it being
truncated at runtime?

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bryce Martin
Sent: Wednesday, October 06, 2010 1:26 PM
To: Midrange Systems Technical Discussion
Subject: RE: Statement gives error in RUNSQLSTM

The previous statement does end with an error but it is only severity 20
telling me the table was created but no journaled. I have 7 create table
statements and they all finish with this error, but the runsqlstm doesn't
choke on them.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



"Morgan, Paul" <Paul.Morgan@xxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/06/2010 02:03 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc

Subject
RE: Statement gives error in RUNSQLSTM






Bryce,

Try running it in a source by itself and see if it gets an error. I'd bet



the create table statement in front of it is the statement in error
(semicolon or no semicolon).

Paul

Principal Programmer Analyst
IS Supply Chain/Replenishment


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bryce Martin
Sent: Wednesday, October 06, 2010 1:23 PM
To: Midrange Systems Technical Discussion
Subject: Re: Statement gives error in RUNSQLSTM

It is not the only statement in the source but all the previous statements




have semicolons. I tried wrapping the select in parens and got the same
error.




Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Vern Hamberg <vhamberg@xxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/06/2010 12:55 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc

Subject
Re: Statement gives error in RUNSQLSTM






Bryce

Is this the only statement in the source? Is there a semicolon missing
from a preceding statement?

And does the SELECT need to be wrapped in parentheses?

Vern

On 10/6/2010 10:41 AM, Bryce Martin wrote:
This statement gives an error in RUNSQLSTM but runs fine from an
interactive sql tool.

INSERT INTO BMDATA/RCM#NAME (K, V) SELECT TRIM(CNME), CCUST FROM
BPCSFFG/RCM WHERE CMID = 'CM' AND CNME NOT LIKE '**%';


Here is the error...
SQL0199 30 9 Position 8 Keyword INTO not expected. Valid tokens:
FOR
WITH FETCH ORDER UNION EXCEPT OPTIMIZE.

It has not been a good SQL day so far for me.

Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
--- This message (including any attachments) is intended only for the
use of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential, and




exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us and
destroy this message immediately. ---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.