Hi all,
How do we get around coding a *ENTRY PList and use /free instead? Is there a way to do this with a prototype?
How do we get around coding a *ENTRY PList and use /free instead? Is there a way to do this with a prototype?
hoption(*srcstmt:*nodebugio) hdftactgrp(*no) actgrp('mysqltst1') hthread(*serialize) hdatfmt(*iso) hbnddir('QC2LE':'JDBC') fsometbl uf a e k disk d conn s like(Connection) d rs s like(ResultSet) d MYSQLTST1 pr extpgm('MYSQLTST1') d usrid 15a const d pword 15a const d MYSQLTST1 pi d usrid 15a const d pword 15a const /copy inclib/qrpglesrc,jni /copy inclib/qrpglesrc,jdbc_h /free exec sql set option commit = *none; conn = jdbc_Connect( 'com.mysql.jdbc.Driver' : 'JDBC:MySQL://smtp.server.com/web_webserver' : %trim(usrid) : %trim(pword) ); if (conn = *null); return; endif; rs = jdbc_ExecQry(conn: 'Select * from stuff'); dow (jdbc_nextRow(rs)); stufid = (jdbc_GetCol(rs:1)); stuftitle = (jdbc_GetCol(rs:2)); stufstatus = (jdbc_GetCol(rs:3)); write sometblr; enddo; jdbc_freeResult(rs); jdbc_close(conn); *inlr = *on; /end-free
/free mysqltst1(var1:var2); /end-free
* Prototype for incoming parms - eliminates need for *ENTRY plist
D Main pr extpgm('RPG123')
D blah 2
* Prototype interface for incoming parms - eliminates need for *ENTRY plist
D Main pi
D blah 2
D RPG123 pr extpgm('RPG123')
D blah 2
D pi D name 10a const /free dsply ('Hello ' + name); return;
Comment