<table>

<!-- 帳票要求テーブル(GE50) 作成 -->
<tr><td width="150px">
<og:link gamenId="REP01" href="index.jsp" target="CONTENTS" 
	keys="command,SYSTEM_ID,DYUPDFROM,DYUPDTO" 
	vals="NEW,{@SYSTEM_ID},{@DYUPDFROM},{@DYUPDTO}" >{@LBL.REP01}
</og:link></td>
<td width="100px">GE50.xml</td>

<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
		select YKNO,GROUPID,LISTID,JOKEN,FGKAN,OUT_DIR,OUT_FILE,COMMENTS,SYSTEM_ID,PDF_PASSWD,SUDATA,SUPAGE,
			   FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD
		from GE50
		where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
		and   FGJ       = '1'
		order by SYSTEM_ID,YKNO
</og:query>

<og:writeTable
	fileURL        = "{@DIR}"
	filename       = "GE50.xml"
	writerClass    = "XML"
	encode         = "UTF-8" >
	<og:writeTableParam key="TableName" value="GE50" />
	<og:writeTableParam key="First" >
		delete from GE50 where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
	</og:writeTableParam>
</og:writeTable>
<td width="100px"><og:text>{@DB.COUNT}</og:text></td>
</tr>


<!-- 帳票データテーブル(GE51) 作成 -->
<tr><td>
<og:link gamenId="REP02" href="index.jsp" target="CONTENTS" 
	keys="command,SYSTEM_ID,DYUPDFROM,DYUPDTO" 
	vals="NEW,{@SYSTEM_ID},{@DYUPDFROM},{@DYUPDTO}" >{@LBL.REP02}
</og:link></td>
<td width="100px">GE51.xml</td>

<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
		select YKNO,EDNO,KBTEXT,TEXT_DATA,SYSTEM_ID,
			   FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD
		from GE51
		where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
		and   FGJ       = '1'
		order by SYSTEM_ID,YKNO,EDNO
</og:query>

<og:writeTable
	fileURL        = "{@DIR}"
	filename       = "GE51.xml"
	writerClass    = "XML"
	encode         = "UTF-8" >
	<og:writeTableParam key="TableName" value="GE51" />
	<og:writeTableParam key="First" >
		delete from GE51 where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
	</og:writeTableParam>
</og:writeTable>
<td width="100px"><og:text>{@DB.COUNT}</og:text></td>
</tr>


</table>
