<?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="application/json; charset=UTF-8" />

<og:head headType="init" />

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

<og:comment
	system	= "GF:エンジンサンプル"
	pgid	= "GF2150"
	title	= "XML出力"
	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,
				INITIAL_EXTENT,FGJ
		from GF02
		where SYSTEM_ID = '{@SYSTEM_ID}'
		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	= "BB1301.json"
		beforeDelete= "true"
		writerClass	= "JSON"
		scope		= "request"
		encode		= "UTF-8" 
	/>
	<og:forward useRedirect="true" page="{@SYS.FILE_OUT_URL}{@USER.ID}/BB1301.json" filename="BB1301.json" />
</og:equals>

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