<jsp:directive.page pageEncoding="UTF-8" />
<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
	select	UPPER(TABLE_NAME) AS TABLE_NAME,UPPER(CLM) AS CLM,NAME_JA,CLS_NAME,
			RENDERER,EDITOR,DBTYPE,
			USE_LENGTH,DATA_DEFAULT,UNIQ,SYSTEM_ID,0 SEQ
	from GF05
	where SYSTEM_ID = '{@SYSTEM_ID_D}'
	and   TBLSYU    = '{@TBLSYU_D}'
	<og:where startKey="and">
		<og:and value="TABLE_NAME like '{@TABLE_NAME_D}%'"	/>
		<og:and value="CLM        like '{@CLM_D}%'"			/>
	</og:where>
	and   FGCOM		<= '7'
	and   FGJ       = '1'
	order by CLM,TABLE_NAME
</og:query>

<og:query command="{@command}" debug="{@debug}" dbid="{@DBID_R}" maxRowCount="0" scope="request">
	select '' as TABLE_NAME,CLM,NAME_JA,CLS_NAME,RENDERER,EDITOR,DBTYPE,
			USE_LENGTH,DATA_DEFAULT,UNIQ,SYSTEM_ID,0 SEQ
	from GEA03
	where SYSTEM_ID in ( '{@SYSTEM_ID_R}','{@AST}' )
	<og:where startKey="and">
		<og:and value="CLM like '{@CLM_R}%'" />
	</og:where>
	and   FGJ       = '1'
	ORDER BY SYSTEM_ID DESC, KBSAKU DESC, CLM
</og:query>

<og:tableMerge
	action        = "MINUS"
	masterScope   = "session"
	masterKeys    = "CLM"
	slaveScope    = "request"
	display       = "true"
/>

<og:value key="lblKey" value="C" />

<!-- FGCOM を、＜＝ '5' とすると、xxsCheck エラーになるため、in で対応 （暫定処置） -->
<!-- 6:除外(-) を設定します。 -->
<og:hidden name="SQL">
	UPDATE GF05 SET
		FGCOM		= '6',
		DYUPD		= '{@USER.YMDH}',
		USRUPD		= '{@USER.ID}',
		PGUPD		= '{@GUI.KEY}'
	WHERE	SYSTEM_ID	= '{@SYSTEM_ID_D}'
	AND		TBLSYU		= '{@TBLSYU_D}'
	<og:where startKey="and">
		<og:and value="TABLE_NAME like '{@TABLE_NAME_D}%'"	/>
	</og:where>
	AND		CLM			= [CLM]
	AND		FGCOM		in ( '0','1','2','3','4','5' )
	AND		FGJ			= '1'
</og:hidden>
