<jsp:directive.page pageEncoding="UTF-8" />
<!-- ﾗﾍﾞﾙ区分更新 -->
<!-- 画面ﾘｿｰｽの画面ﾚﾍﾞﾙ(GUILVL) が、3:通常 の場合は、ﾗﾍﾞﾙ区分(KBLBL)を、3:画面 にし、それ以外は、4:画面分類 にします。 -->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select A.SYSTEM_ID,A.GUIKEY as CLM ,
			case A.GUILVL when '3' then '3' else '4' end as KBLBL
	from   GEA11 A inner join GEA08 B
			on  A.SYSTEM_ID = B.SYSTEM_ID
			and A.GUIKEY    = B.CLM
			and case A.GUILVL when '3' then '3' else '4' end != B.KBLBL
	where  A.SYSTEM_ID = '{@SYSTEM_ID}'
	and    A.FGJ       = '1'
	and    B.FGJ       = '1'
</og:query>

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

<og:hidden name="SQL">
	UPDATE GEA08 SET
			KBLBL   = [KBLBL],
			DYUPD   = '{@USER.YMDH}',
			USRUPD  = '{@USER.ID}',
			PGUPD   = '{@GUI.KEY}'
	WHERE SYSTEM_ID = [SYSTEM_ID]
	AND   CLM       = [CLM]
</og:hidden>
