Midrange News for the IBM i Community


Posted by: renojim
CL, java and qtemp
has no ratings.
Published: 23 May 2019
Revised: 14 Aug 2019 - 10 days ago
Last viewed on: 23 Aug 2019 (94 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

CL, java and qtemp Published by: renojim on 23 May 2019 view comments(4)

I'm quite sure the answer is no, but there are much higher minds than mine here and I could be wrong. It's happened before. Is there a way to, from CL, create a table in qtemp, then access that table from a java program called via QSH?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: CL, java and qtemp
Posted: 3 months 2 days 2 hours 49 minutes ago
Edited: Wed, 29 May, 2019 at 18:34:14 (87 days ago)

Does QSH run in a thread or something? Why wouldn’t you be able to get to the file from JAVA?

Perhaps I’m not understanding the context of the environment you’re setting up.

Posted by: renojim
Premium member *
Comment on: CL, java and qtemp
Posted: 2 months 15 days 11 hours 34 minutes ago

Sorry for not responding. I've been off on another 'track'. This process works fine if I use some other library, but it does not work with QTEMP. Having a difficult time trying to figure out why, however, this process only needs to run one more time at the end of the year. After that it, like myself and my co-workers, are going to be replaced by packaged software and put out to pasture. So since it works with another library, I'll leave it that way because in this case at least, good enough is in fact good enough. Thanks much though.

Posted by: MarkSWaterbury
Comment on: CL, java and qtemp
Posted: 9 days 2 hours ago

I believe the problem is because STRQSH (aka. QSH) spawns a separate BCI job, just like QP2TERM does.   As a separate job, each spawned BCI job will have its own "QTEMP."

 

 

Posted by: MarkSWaterbury
Comment on: CL, java and qtemp
Posted: 9 days 1 hours 57 minutes ago

Also, if you do not use STRQSH or QSH but instead just run the Java stuff directly within the same job, e.g. via the RUNJVA or JAVA command, (in IBMi or OS/400), then it will "work" as the JVM will be in the same "job" and so it will share the same QTEMP.