Hi
Problem is that I have created one that is below in this paragraph. I am unable to get values on Java code. I got only null from there. please help me to get values from there.
Problem is that I have created one that is below in this paragraph. I am unable to get values on Java code. I got only null from there. please help me to get values from there.
PHP Code:
*****************************RPG PROGRAM*************************************
dstdid s 10i 0
dStdid1 S 10a
dstdname s 10a
daddress1 s 10a
dcity1 s 10a
dErrorid s 1a
doption s 1a
c *entry plist
c parm STDID1
c parm STDNAME
C parm address1
c parm city1
c parm errorid
c parm option
c eval stdid=%int(stdid1)
c/Exec sql Include SQLCA
c/End-exec
C SELECT
C when option='I'
c exsr insert1
C WHEN option='S'
c exsr select1
C WHEN option='D'
c exsr delete1
c endsl
c Return
*--------------------------------------------------------------
* insert or update subroutine
*--------------------------------------------------------------
c INSERT1 BEGSR
c/Exec sql Include SQLCA
c/End-exec
c/Exec sql insert into student1/smaster1 (sid,name,address,city)
c+ VALUES( :stdid, :stdname, :address1, :city1)
c/end-exec
c If Sqlcode = -803
c Eval Errorid = 'D'
c/Exec sql
c+ Update student1/smaster1 set name= :stdname, city = :city1,
c+ address= :address1
c+ where (sid = :stdid)
c/end-exec
*
c Else
c Eval Errorid = 'Y'
c Endif
*
c commit
c Errorid Dsply
c endsr
*---------------------------------------------------------------
* SELECT subroutine
*---------------------------------------------------------------
c select1 begsr
c/exec sql
c+ declare A cursor for
c+ select name, address, city from student1/smaster1 where sid=:stdid
c+
c/end-exec
c/exec sql
c+ open A
C/end-exec
c/exec sql
c+ fetch A into :stdname, :address1,:city1
c/end-exec
c/exec sql
c+ close A
C/end-exec
c endsr
*-------------------------------------------------------------
* DELETE subroutine
*-------------------------------------------------------------
c delete1 begsr
c/Exec sql
C+ DELETE FROM STUDENT1/SMASTER1 WHERE sid= :stdid
c/end-exec
C IF sqlcode=100
c eval errorid='N'
c errorid dsply
c endif
c endsr
**************************************JAVA CODE*********************************
if (pgm.run())
{
// parmList = pgm.getParameterList();
String sts = ((String) (new AS400Text(10).toObject(parmList[3].getInputData(), 0)));
Object asRC = null;
// pgm.getParameterList().length,
sts = parmList[0].getOutputData().toString(); //OUTPUT NULL
sts = parmList[1].getOutputData().toString();//OUTPUT NULL
sts = parmList[2].getOutputData().toString();//OUTPUT NULL
sts = parmList[3].getOutputData().toString();//OUTPUT NULL
sts = parmList[4].getOutputData().toString();//OUTPUT NULL
sts = parmList[5].getOutputData().toString();//OUTPUT NULL
}
else
{
AS400Message[] messageList = pgm.getMessageList();
for (int msg = 0; msg < messageList.length; msg++) {
}
}