<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld"
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

<og:head headType="init" />

<jsp:scriptlet>
	session.setMaxInactiveInterval( 10 );
</jsp:scriptlet>

<og:comment
	system	= "GF:エンジンサンプル"
	pgid	= "GF7020"
	title	= "WebService"
	date	= "2008/10/27"
	author	= "Hiroki.Nakamura"
	text	= ""
	version	= "001"
/>

<!-- GF02 作成 -->
<og:query command="NEW" debug="{@debug}" maxRowCount="0" scope="request">
		select SYSTEM_ID,TBLSYU,TABLE_NAME,NAME_JA,SKENSU,JKENSU,TABLESPACE_NAME,COMMENTS,
				INITIAL_EXTENT,FGJ
		from GF02
		where SYSTEM_ID = '{@SYSTEM_ID}'
		and   TBLSYU = '{@TBLSYU}'
		and   FGJ       = '1'
		order by TABLE_NAME,NAME_JA,TBLSYU
</og:query>

<og:equals val1="{@DB.COUNT}" val2="0">
	<og:responseHeader status="404" />	<!-- 404:HttpServletResponse.SC_NOT_FOUND -->
</og:equals>

<og:equals val1="{@DB.COUNT}" val2="0" notEquals="true" >
	<og:writeTable
		fileURL		= "{@USER.ID}"
		filename	= "GF7020_GF02.xml"
		beforeDelete= "true"
		writerClass	= "XML"
		scope		= "request"
		encode		= "UTF-8" >
		<og:writeTableParam key="TableName" value="GF02" />
		<og:writeTableParam key="First" >
			delete from GF02 where SYSTEM_ID = '{@SYSTEM_ID}' and TBLSYU = '{@TBLSYU}'
		</og:writeTableParam>
	</og:writeTable>

	<og:forward useRedirect="true" page="{@SYS.FILE_OUT_URL}{@USER.ID}/GF7020_GF02.xml" filename="GF02.xml" />
</og:equals>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
