<?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="result" />
<jsp:directive.include file="/jsp/custom/result_info.jsp" />
<og:comment
	system   = "GE:エンジンサンプル"
	pgid     = "REP13"
	title    = "取込EXCEL登録"
	date     = "2007/12/12"
	author   = "K.HASEGAWA"
	text     = "ZZZZ"
	version  = "001"
/>

<og:value command="SQL">
<!--
	<jsp:text>select 12 as YKNO from DUAL</jsp:text>
-->
	<jsp:text>select GE50S01.NEXTVAL as YKNO from DUAL</jsp:text>
</og:value>

<!-- 注意 upload タグで、multipart/form-data から値を取り出しているため、
	 このタグより前では、{@xxxx} は、使用できません。
	 {@USER.xxxx} は、別途登録しているので、使用できます。   -->
<og:upload
	fileURL  = "{@SYS.REAL_PATH}{@SYS.EXCEL_IN_FILE_URL}{@V_SYSTEM_ID}/{@V_LISTID}"
	filename = "{@YKNO}.xls"
/>

<og:columnCheck
	command   = "NEW"
	nullCheck = "V_SYSTEM_ID,V_LISTID,V_JOKEN,file1"
/>

<og:view
	command      = "NEW"
	viewFormType = "HTMLTable" 
	writable     = "false"
/>
<br />

<og:query command="NEW" debug="{@debug}" maxRowCount="{@maxRowCount}">
	<jsp:text>
		INSERT INTO GE50
		  (SYSTEM_ID,YKNO,LISTID,JOKEN,FGKAN,OUT_DIR,OUT_FILE,
			FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD
		  )
		 VALUES
		  ('{@V_SYSTEM_ID}',{@YKNO},'{@V_LISTID}','{@V_JOKEN}','1','{@directory}','{@file1_ORG}',
			'1','{@USER.YMDH}','{@USER.YMDH}','{@USER.ID}','{@USER.ID}','{@GUI.KEY}'
		  )
	</jsp:text>
</og:query>

<og:message lbl="MSG0003" comment="ファイルの登録が完了しました。" />

<og:value command="REMOVE" key="V_SYSTEM_ID" scope="session" />
<og:value command="REMOVE" key="V_LISTID"    scope="session" />
<og:value command="REMOVE" key="V_JOKEN"     scope="session" />

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