커서 및 데이터 구조를 프로 시저에 전달하려면 프로 시저가 SQL 커서의 다음 행으로 구조를 채 웁니다. 이것이 가능한가? 내가 얻으려고하는 것의 틀은 아래에있다.RPG 변수를 커서 이름으로 사용하여 SQL 문 실행
*****************************************************
*
* Fetch the next row from a cursor
*
* @param cursor - the name of the cursor
* @param structure - the data structure to hold the fields
*****************************************************
pfetchNextRow B
DfetchNextRow PI N
d cursor 32767A varying const
d structure DS ???????
/free
exec sql
fetch next from :cursor into :structure
;
if (sqlstate = SQL_SUCCESS);
return *on;
else;
exec sql
close :cursor;
return *off;
endif;
/end-free
pfetchNextRow E
커서를 전달하는 방법과 데이터 구조 매개 변수를 정의하는 방법은 무엇입니까?
감사합니다. 그들과 함께 등록했습니다. – jax