× 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 wanted to bring everyone up to date on my progress (and so the archives
have the benefit of my learning experience here).

I changed the code as Tom and Simon suggested. I have one basic problem at
this point. But first - here are are some snippets of the code:

LINKAGE SECTION.

01 SQL1-RETCODE PIC X.
COPY EZDAEP OF QSYSINC-QLBLSRC.
01 LIBNAME PIC X(10).
01 SQL-STATEMENT-TEXT2 PIC X(1024).

PROCEDURE DIVISION USING SQL1-RETCODE, QZDA-INIT-FORMAT.

set address of QZDA-NDB-FORMAT1 to
address of QZDA-INIT-FORMAT.
<snip>
set address of QZDA-SQL-FORMAT2 to
address of QZDA-INIT-FORMAT.

IF FORMAT-NAME
OF QZDA-SQL-FORMAT2 = 'ZDAQ0200'

SET MY-PTR TO ADDRESS OF SQL-STATEMENT-TEXT-LEN
OF QZDA-SQL-FORMAT2
SET ADDRESS OF SQL-STATEMENT-TEXT2 TO MY-PTR
SET MY-PTR UP BY LENGTH OF SQL-STATEMENT-TEXT-LEN

STRING TODAYS-DATE SPACE TODAYS-TIME SPACE
USER-PROFILE
OF QZDA-SQL-FORMAT2 '~'
SERVER-ID
OF QZDA-SQL-FORMAT2 '~'
FORMAT-NAME
OF QZDA-SQL-FORMAT2 '~'
FUNCTION-TEXT '~'
PACKAGE-NAME
OF QZDA-SQL-FORMAT2 '~'
PACKAGE-LIB-NAME
OF QZDA-SQL-FORMAT2 '~'
SQL-STATEMENT-TEXT2
(1:SQL-STATEMENT-TEXT-LEN)
DELIMITED BY SIZE INTO FD-ODBCLOG-RECORD

When I display "SQL-STATEMENT-TEXT2 (1:SQL-STATEMENT-TEXT-LEN)" in the
debugger it looks *almost* fine - but the contents of the SQL statement
do not get
'strung' into the output record. Everything is there but the
SQL-STATEMENT-TEXT2 itself.

I have tried DELIMITED BY '|' instead of DELIMITED BY SIZE just in case
that was the problem, but there was no change.

Any ideas at all what I am doing wrong?

Scott


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.