Re: Embedded SQL calling another Embedded SQL program



The problem is when I disable the connect/disconnect on program B, when the
call is made, no data is loaded because it will say that the database is not
in a connected state. Even though Program A is.


"Jonathan Ball" <notgenx32@xxxxxxxxx> wrote in message
news:1133293792.827437.47500@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Eddie Gomez wrote:
>> Anyone deal with a full SQLRPG Video program calling another SQLRPG Video
>> program without losing the cursor pointers in the first program?
>>
>> Program A is a standalone SQLRPG program which simply displays a subfile.
>> Program A requires a call to another video program (Program B) and
>> Program B
>> in turn is normally a standalone program as well.
>>
>> Program A and Program B both have standard CONNECT RESET and DISCONNECT
>> clauses.
>>
>> When program A calls program B, and then I return back to Program A, it
>> will
>> not scroll down and load additional records. The job logs indicate
>> obviously that the database is not connected and/or the cursor is not
>> open.
>> I know why it's doing it but not necessarily know how to fix it. By
>> calling
>> program B, the database connection and cursor is closed in A and I doing
>> a
>> subfile reload is not really an option because users can change values in
>> the subfile which a reload would wipe out.
>>
>> If someone can point me in the right direction and/or post a link to some
>> type of article, it would really help!
>>
>> Any advice would be greatly appreciated.
>
> I haven't seen CONNECT RESET and DISCONNECT used in this way; I have to
> say it sounds a little odd.
>
> If there's some valid reason for doing those, then the answer may be to
> pass a parameter to B, or perhaps a switch setting, and if B is being
> called by A it doesn't do the CONNECT RESET / DISCONNECT logic; if it's
> being called in "standalone" mode it does.
>


.



Relevant Pages