<og:query command="{@command}" debug="{@debug}" dbid="{@DBID1}" maxRowCount="{@maxRowCount}">
	select '1' WRITABLE,TABLE_NAME,CLM,NAME_JA,EDITOR,RENDERER,DBTYPE,BIKO,0 SEQ,'' CODE,'' CODENAME,UNIQ,SYSTEM_ID
	from GF05 A
	where A.SYSTEM_ID = '{@SYSTEM_ID1}'
	and   A.TBLSYU    = '{@TBLSYU1}'
	and   A.FGJ       = '1'
	and   ( A.EDITOR = 'MENU' OR A.RENDERER = 'MENU' )
	order by CLM,TABLE_NAME
</og:query>

<og:query command="{@command}" debug="{@debug}" dbid="{@DBID2}" maxRowCount="{@maxRowCount}" scope="request">
	select '0' WRITABLE,'' TABLE_NAME,CLM,NAME_JA,EDITOR,RENDERER,DBTYPE,'' BIKO,0 SEQ,'' CODE,'' CODENAME,UNIQ,SYSTEM_ID
	from GEA03 A
	where A.SYSTEM_ID = '{@SYSTEM_ID2}'
	and   A.FGJ       = '1'
	and   ( A.EDITOR = 'MENU' OR A.RENDERER = 'MENU' )
	ORDER BY A.CLM
</og:query>

<og:tableFilter
	classId	= "DBSELECT"
	dbid	= "{@DBID2}"
	scope	= "request"
	keys	= "APPEND"
	vals	= "true"
	selectedAll	= "true"
>
	select CASE
			WHEN B.LNAME LIKE '%:%' THEN B.LNAME
			ELSE A.CODE{@DBF.CON}':'{@DBF.CON}B.LNAME END BIKO
	from GEA04 A inner join GEA08 B
	on A.CLM{@DBF.CON}'.'{@DBF.CON}A.CODE = B.CLM
	and A.FGJ = B.FGJ
	and A.SYSTEM_ID = B.SYSTEM_ID
	where A.SYSTEM_ID = [SYSTEM_ID]
	and A.CLM = [CLM]
	and A.FGJ = '1'
	and B.LANG = 'ja'
	order by A.CLM,A.SEQNO
</og:tableFilter>

<og:tableMerge
	action        = "DIFFERENCE"
	masterScope   = "session"
	masterKeys    = "CLM"
	diffKeys      = "BIKO"
	modifyClms    = "UNIQ"
	slaveScope    = "request"
	display       = "true"
/>

<og:tableFilter classId="BIKO2CODE" />

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

<og:hidden name="SQL">
	INSERT INTO GEA04
		(SYSTEM_ID,CLM,CODE,SEQNO,CODELVL,KBSAKU,
		 FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD)
	VALUES
		('{@SYSTEM_ID2}',[CLM],[CODE],[SEQ],1,'1',
		 '1','{@USER.YMDH}','{@USER.YMDH}','{@USER.ID}','{@USER.ID}','{@GUI.KEY}')
</og:hidden>

<og:hidden name="SQL2">
	INSERT INTO GEA08
		(SYSTEM_ID,CLM,
		 NAME_JA,LNAME,
		 KBSAKU,KBLBL,LANG,FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD)
	VALUES
		('{@SYSTEM_ID2}',[CLM]||'.'||[CODE],
		 [CODENAME],[CODENAME],
		 '1','6','ja','1','{@USER.YMDH}','{@USER.YMDH}','{@USER.ID}','{@USER.ID}','{@GUI.KEY}')
</og:hidden>

<og:hidden name="SQLD">
	UPDATE GEA04 SET
			FGJ       = '9',
			DYUPD     = '{@USER.YMDH}',
			USRUPD    = '{@USER.ID}',
			PGUPD    = '{@GUI.KEY}'
	WHERE SYSTEM_ID = '{@SYSTEM_ID2}'
	AND   CLM       = [CLM]
</og:hidden>

<og:hidden name="SQLD2">
	UPDATE GEA08 SET
			FGJ       = '9',
			DYUPD     = '{@USER.YMDH}',
			USRUPD    = '{@USER.ID}',
			PGUPD    = '{@GUI.KEY}'
	WHERE SYSTEM_ID = '{@SYSTEM_ID2}'
	AND   CLM       like [CLM]||'.%'
</og:hidden>