|
Hi,
I have used the same concept. I wrote a CL program that calls an RPG
program. I have included the code of CL, RPG and Java program. But my query
doesn't work. It tells file does not exist..
It's an urgent requirement.. Can anyone help...
<<QtempTest.java>> <<QTEMPCL.txt>> <<QTEMPRPG.txt>>
Thanks and Regards,
Guru
-----Original Message-----
From: DUCRET Gilles (GVA) [SMTP:Gilles.DUCRET@lloydsbank.ch]
Sent: Tuesday, March 14, 2000 6:28 PM
To: 'JAVA400-L@midrange.com'
Subject: RE: How to access a file from QTEMP.
This is exactly what we do:
all our RPG programs are called via stored procedures.
The stored procedures are called by jdbc.
We then can reuse the connexion used to call the stored procedure
to read in Qtemp
-----Original Message-----
From: Adolfo López Escribano [mailto:escriban@www.agbar.es]
Sent: mardi, 14. mars 2000 12:40
To: JAVA400-L@midrange.com
Subject: RE: How to access a file from QTEMP.
The solution can be using only one via to call server programs and I
think that the best is using only JDBC. You can encapsulate the non stored
procedures RPG programs into CLLEs programs and then register its as sql
procedures (CREATE PROCEDURE proc(...) LANGUAGE CL ... ).
----- Mensaje original -----
De: AnanthaRamaiah, Gururaja (CTS)
<mailto:AGururaj@chn.cts-corp.com>
Para: JAVA400-L@midrange.com <mailto:JAVA400-L@midrange.com>
Enviado: martes 14 de marzo de 2000 10:33
Asunto: RE: How to access a file from QTEMP.
Thanks for the reply..
But How can I use a connection that is used for ProgramCall
class to use CallableStatement.
Because CallableStatement needs a JDBC connection and
ProgramCall uses AS400(class) connection.
Thanks and Regards,
Guru
-----Original Message-----
From: DUCRET Gilles (GVA) [
SMTP:Gilles.DUCRET@lloydsbank.ch <mailto:SMTP:Gilles.DUCRET@lloydsbank.ch> ]
Sent: Tuesday, March 14, 2000 1:29 PM
To: 'JAVA400-L@midrange.com'
Subject: RE: How to access a file from QTEMP.
We read QTEMP file by reusing the same connexion as the
program that wrote
data to QTEMP
-----Original Message-----
From: AnanthaRamaiah, Gururaja (CTS) [
mailto:AGururaj@chn.cts-corp.com <mailto:AGururaj@chn.cts-corp.com> ]
Sent: mardi, 14. mars 2000 06:13
To: java400-l@midrange.com
Subject: How to access a file from QTEMP.
Hi,
I have a coded a java servlet that calls an AS/400 SQLRPGLE
program.
The rpg program creates a file in QTEMP library and
populates it.
I have written a stored procedure that reads data from this
file.
I am calling the RPG using ProgramCall class.
Since CallableStatement is a separate connection, my QTEMP
file is not visible to it.
Is there a way to solve the above problem.
We have to use QTEMP as it's a temporary file and we don't
want to write separate house keeping routine to clean it after each
connection.
Thanks in advance
Guru
**********************************************************************
This E-mail and any files transmitted with it are
confidential
and intended for the exclusive use of the addressee(s) only.
You should not disclose its contents to any other person.
If you are not the intended recipient please notify the
sender
immediately.
**********************************************************************
**********************************************************************
This E-mail and any files transmitted with it are confidential
and intended for the exclusive use of the addressee(s) only.
You should not disclose its contents to any other person.
If you are not the intended recipient please notify the sender
immediately.
**********************************************************************
PGM PARM(&PARM1)
DCL VAR(&PARM1) TYPE(*CHAR) LEN(1)
QSYS/CALL PGM(ACCLIB/QTEMPRPG)
FAGENT IF E K DISK
C/EXEC SQL
C+ CREATE TABLE QTEMP/AGENT (AGENTID CHARACTER(5),
C+ AGENTNM CHARACTER(20), PASSWORD CHARACTER(10))
C/END-EXEC
C READ AGENT
C DOW %EOF(AGENT) = *OFF
C/EXEC SQL
C+ INSERT INTO QTEMP/AGENT VALUES(:AGENTID, :AGENTNM, :PASSWORD)
C/END-EXEC
C READ AGENT
C ENDDO
C SETON LR
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.