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



(Lost the original post of this threat.)

I was thinking about embedded SQL.

If it is possible to do an OPEN CURSOR/CLOSE CURSOR on an EXEC IMMEDIATELY SQL 
directive, then you may generate an OPEN/CLOSE SQL statement on the 
fly.Sommething like this (beware, I am not that familiar with embedded SQL):

P OpenFiles         B
D OpenFiles         PI                          N
D       CursorName                     18
D OpenStatement         S            56
D Error                         S                   N
C                         Eval   OpenStatement = 'OPEN ' + Cursorname
C+SQL EXEC IMMED :OpenStatement
C+END
C                          If         SQLCODE < 0
C                          Eval     Error = *ON
C                          EndIf
C                          Return error
P OpenFiles          E   

If this works, it will mean a rewrite of the programme with the SQL 
instructions in the right order for the (pre)compiler.

Just a thought.

Regards,
Carel Teijgeler

P.S. I know some will mention to test SQLSTATE instead, but I do not think this 
programme will be ported to another platform, will it?

*********** REPLY SEPARATOR  ***********

On 7-1-05 at 14:51 Jon Paris wrote:

>>> Could you write a subprocedure in CLLE using the OPNDBF command?
>
>That just opens the ODP - it won't help the RPG - it still needs to open
>the
>file.
>
>The only way I know to handle it via a pointer is to use the C record I/O
>APIs.
>
>As Bob noted earlier - sharing of files between modules in RPG "sucks".
>Even COBOL's EXTERNAL option is an improvement in many ways.
>




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.