× 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 had no problem with this runsqlstm example:
0001.00 -- this is a comment
0002.00 update asapfile2/ioedet set odpart = 'TESTING PART'
0003.00 where odcono = 84 and odcusn = 'FRED '

Not all sql statements allowed (like Select)
multiple sql statements require a semicolon (;) between statements

Also in RPGLE, you can build your whole string (like 512a or more)
C* PREPARE VARIABLE S1 FOR THE BUILT STRING "STR"
C*
C/EXEC SQL
C+   PREPARE S1 FROM:STR
C/END-EXEC
C* SET THE CURSOR
C/EXEC SQL
C+   DECLARE C1 CURSOR FOR S1
C/END-EXEC
C/EXEC SQL OPEN C1
C/END-EXEC
jim


----- Original Message ----- 
From: "Vern Hamberg" <vhamberg@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Tuesday, June 22, 2004 8:28 AM
Subject: Re: RUNSQLSTM 80 byte limit question


> Not as far as I know, Mark. I just tried a SRC PF with RCDLEN(112) and it
> failed, showing only the first 80 characters.
>
> QMQRY is worse - the limit is 79. And embedded SQL in RPG IV is even worse
> - 73 characters - as the comment portion is not included. (Can you put
> embedded SQL inside /free blocks?) You have to use C to get a choice of
> record width - check out the CRTCQLCI command, which lets you specify the
> source width for SQL statements.
>
> But this raises another matter in my mind, viz., long, strung-out SQL
> statements vs. shorter, formatted statements. SQL, being unstructured and
> containing all kinds of processing in one statement (similar to nesting
> function calls in C but not often recommended) is hard enough to
> understand, to see what is going on. It really helps me to separate the
> various clauses to different lines, to put column names on separate lines,
> to align opening and closing parentheses vertically, to use some
indenting,
> etc. This all is aimed at clarity. It also means that I don't use long
> lines much. Sort of like pretty-print for program code.
>
> HTH
> Vern
>
> At 06:36 AM 6/22/2004, you wrote:
> >Does anyone know how to make RUNSQLSTM recognize more than 80 bytes per
line
> >or another command to use (perhaps within STRSQL) to read a longer source
> >command record.
> >
> >Mark Villa in Summerville SC
>
>
> --
> 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 ...

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.