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



Eric,

I'll post a few here in increasing complexity. This is the second one I've posted today on the forum. Here is one that is not of my creation and I can't remember the author. It is a useful
training tool for learning how to do an SQL INSERT from REXX. The TRACE function does not function here because it has been commented out. It could have been just as easily turned off by TRACE 'o'. Also, notice I have the DELETE and the CREATE table commented out. This is because after I run this program the first time with them NOT commented out to create a dictionary table, I don't want the table deleted and created each time.

Oh, BTW, I think this answers someone else's question about how to switch COMMIT to *NONE

/* CRTDICT compiles English-Spanish-English dictionary */
/* trace 'r'*/
address EXECSQL
EXECSQL 'SET OPTION COMMIT = *NONE'
/* */
/* EXECSQL 'DELETE TABLE DODOM1/DICTIONARY'
EXECSQL 'CREATE TABLE DODOM1/DICTIONARY',
' (E_WORD CHAR(20) NOT NULL,',
' S_WORD CHAR(20) NOT NULL)' */
/* */
INS = 'INSERT INTO DODOM1/DICTIONARY VALUES(?,?)'
EXECSQL 'PREPARE I1 FROM :INS'
say "Insert a couple of words: English-Spanish"
do forever
say "English-Spanish"
parse upper linein E "-" S
if E = "" then leave
EXECSQL 'EXECUTE I1 USING :E, :S'
if RC = 0 then say "OK"; else say "Error, RC = "RC
end


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.