I am not familiar with the internals of z/OS ... YMMV. My initial take would be that it would depend on whether the LE remains active (initialized) and maintains its memory allocations/file opens, etc, between invocations from your native z/OS assembly code. That is to say is the sequence:
run z/OS assembly call "C" LE initialize environment ... do stuff in environment tear down environment and release all its resources carry on in z/OS assembly or is it more like: run z/OS assembly call "C" LE initialize LE environment if it is not initialized otherwise use existing environment ... do stuff in environment carry on in z/OS assembly ... eventually when process ends clean up the LE environment if it exists If the latter then you should be able to open the database and keep a static pointer to the sqlite3 structure across "jumps" into the LE environment. If the environment and all its resources are released (as in the former case) when you return back to native z/OS then obviously you cannot do that. Which one it does is probably documented somewhere, however, I would suspect the latter case (initialize only once) for performance reasons, unless the LE environment is another "process" ... --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of David Jackson >Sent: Wednesday, 29 August, 2018 16:26 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] sqlite on IBM z/OS Unix > >Having successfully ported sqlite to z/OS Unix as a 32 bit app, I am >now >looking at a c program to make SQL calls to this. >Starting with an Assembler routine that runs within z/OS (not Unix), >which >is not LE (Language Environment)enabled, we then call a c routine >(numerous >times) that is LE enabled. That is all working fine and making good >SQL >calls to sqlite. the c program then returns back to the upper >assembler >calling program. The problem is that the c routines is opening, >issuing the >SQL and closing on each invocation. > >Now this may be a dumb question, so apologies up front. >Is there any way that the c program can open the sqlite db initially >on the >first call and keep it open after it returns back to the calling >program >until a final call at which point it will issue the sqlite3_close. > >Again - sorry if this was a dumb question. > >Thanks >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users