[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[orca-dev:00500] dbsについて(長文ご容赦)



小林@九大です

 dbsに関しての質問です。現在,各ファイルについては以下のように設定して
おります。これでtbl_ptinfのデータをHashMapにMappingしようとしております。
user ID, User passwordをdbsへ投げて,Connect OKは返ってきますが,その後,
Exec: DBOPENをdbsへ投げたところで返事が返ってきません。問題点がありまし
たらご指摘お願いします。

作業ディレクトリ
/home/skoba/dbd/

dbs起動コマンド
sudo -u orca /usr/lib/jma-receipt/sbin/dbs -base . -dbddir . -port 8013
-dbhost localhost tbl_test 

directory
----------------------------
name	tbl_test;
base	"/home/skoba/dbd";

lddir	"=";
bddir	"=";
dbddir	"=";
record	"=";
linkage	link;

ld	{
	tbl_test	"localhost:9100";
};
bd	{
	tbl_test;
};
db	{
	tbl_test;
};

#include	<dbgroup.inc>
------------------------------

dbgroup.inc
------------------------------
db_group	"ORCA"	{
	type	"PostgreSQL";
	port	"localhost";
	name	"orca";
#	redirect_port	"localhost:9300";
#	redirect		"log";
};

db_group	"shell"	{
	type	"Shell";
	priority	1000;
};
-------------------------------------

tbl_test.dbd
-------------------------------------
name	tbl_test;
arraysize 20;
textsize 200;

db 	{
	tbl_ptinf;
};
-------------------------------------

tbl_test.bd
-------------------------------------
name	tbl_test;
arraysize 20;
textsize 200;

db "ORCA" {
	tbl_ptinf;
};
--------------------------------------

tbl_ptinf.db
--------------------------------------
tbl_ptinf {
	HOSPID				char(24);
	PTID				number(10,0);
	KANANAME			varchar(100);
	NAME 				varchar(100);
	NICKNAME			varchar(100);
	SEX        			char(1);
	BIRTHDAY 			char(8);
	DEATHKBN			char(1);
	HOME_POST			varchar(7);
	HOME_ADRS			varchar(200);
	HOME_BANTI 			varchar(200);
	HOME_TEL1 			varchar(15);
	HOME_TEL2 			varchar(15);
	SETAINUSI			varchar(100);
	ZOKUGARA			varchar(60);
	JOB 		        varchar(40);
	KEITAI_TEL			varchar(15);
	FAX				varchar(15);
	EMAIL				varchar(50);
	DISCOUNT			char(2);
	DISCOUNT_RATE			char(2);
	CONDITION_1			char(2);
	CONDITION_2			char(2);
	CONDITION_3			char(2);
	COMMENT_1			varchar(200);
	COMMENT_2			varchar(200);
	TABOO_1				varchar(200);
	TABOO_2				varchar(200);
	ALLERGY_1			varchar(200);
	ALLERGY_2			varchar(200);
	KANSENSYO_1			varchar(200);
	KANSENSYO_2			varchar(200);
	RENRAKU_NAME			varchar(100);
	RENRAKU_ZOKUGARA		varchar(60);
	RENRAKU_POST 			varchar(7);
	RENRAKU_ADRS			varchar(200);
	RENRAKU_BANTI			varchar(200);
	RENRAKU_TEL1			varchar(15);
	RENRAKU_TEL2			varchar(15);
	OFFICE_NAME 			varchar(100);
	OFFICE_POST			varchar(7);
	OFFICE_ADRS 			varchar(200);
	OFFICE_BANTI			varchar(200);
	OFFICE_TEL 			varchar(15);
	KISEI_NAME 			varchar(100);
	KISEI_POST 			varchar(7);
	KISEI_ADRS 			varchar(200);
	KISEI_BANTI			varchar(200);
	KISEI_TEL  			varchar(15);
	TSTPTNUMKBN			char(1);
	MAXZAINUM   			number(8,0);
	RRKNUM					number(3,0);
	RRKEDANUM				number(3,0);
	TERMID   			varchar(16);
	OPID     			varchar(16);
	CREYMD   			char(8);
	UPYMD    			char(8);
	UPHMS				char(6);
};

primary	{
	HOSPID,PTID;
};

path	key		{ 	
	DBSELECT	{
		DECLARE tbl_ptinf_key_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE   HOSPID      =   :HOSPID  AND
					PTID  		=   :PTID
		;
	};
};

path	key2	{
	DBSELECT	{
		DECLARE tbl_ptinf_key2_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE  (HOSPID    = :HOSPID) AND
					NAME   LIKE :NAME
			ORDER BY NAME
		;
	};
};
path	key3	{
	DBSELECT	{
		DECLARE tbl_ptinf_key3_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE  (HOSPID    = :HOSPID) AND
			(KANANAME  LIKE :KANANAME)
			ORDER BY   KANANAME
		;
	};
};
path	key4	{
	DBSELECT	{
		DECLARE tbl_ptinf_key4_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE   HOSPID    =   :HOSPID
		;
	};
};
path	key5	{
	DBSELECT	{
		DECLARE tbl_ptinf_key5_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE ( HOSPID    =   :HOSPID )  AND
			((NAME   LIKE :NAME  ) OR
			(KANANAME  LIKE :KANANAME))
			ORDER BY   KANANAME
		;
	};
};
path	all	{
	DBSELECT	{
		DECLARE tbl_ptinf_all_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
 		;
	};
};
path	key6	{
	DBSELECT	{
		DECLARE tbl_ptinf_key6_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE ( HOSPID    =   :HOSPID )  AND
                              ( SEX       =   :SEX    )  AND
                              ( BIRTHDAY  LIKE  :BIRTHDAY )  AND
			((NAME   LIKE :NAME  ) OR
			(KANANAME  LIKE :KANANAME))
			ORDER BY   BIRTHDAY,
                                   KANANAME
		;
	};
};
path	key7	{
	DBSELECT	{
		DECLARE tbl_ptinf_key7_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE ( HOSPID    =   :HOSPID )  AND
                              ( SEX       =   :SEX    )  AND
                              ( BIRTHDAY  LIKE  :BIRTHDAY )
			ORDER BY   BIRTHDAY,
                                   KANANAME
		;
	};
};
path	key8	{
	DBSELECT	{
		DECLARE tbl_ptinf_key8_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE ( HOSPID    =   :HOSPID )  AND
                              ( SEX       =   :SEX    )
			ORDER BY  KANANAME
		;
	};
};
path	key9	{
	DBSELECT	{
		DECLARE tbl_ptinf_key9_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE ( HOSPID    =   :HOSPID )  AND
                              ( BIRTHDAY  LIKE  :BIRTHDAY )
			ORDER BY   BIRTHDAY,
                                   KANANAME
		;
	};
};
path	mega1	{
	DBSELECT	{
		DECLARE tbl_ptinf_mega1_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE	HOSPID	=	:HOSPID
			AND	PTID	=	:PTID
		;
	};
	DBFETCH		{
		FETCH	tbl_ptinf_mega1_csr
		INTO
		 :HOSPID,
		 :NAME,
		 :PTID
		;
	};
};
-------------------------------------------

link.rec
------------------------------------------
ptlink	{
	linktext	char(200);
};
------------------------------------------

shell.db
------------------------------------------
shell	{
	name	varchar(80);
	arg		varchar(80);
};

path	do	{
	ECHO	{
		echo :arg;
	};
	COMMAND	{
		:name :arg;
	};
	CAT	{
		echo :arg;
		cat :arg;
	};
};
------------------------------------------

tbl_test.db
-----------------------------------------
tbl_test {
	HOSPID				char(24);
	PTID				number(10,0);
	NAME 				varchar(100);
};
primary	{
 	HOSPID,PTID;
};
path mega1 { 	
	DBSELECT {
		DECLARE tbl_ptinf_key_csr CURSOR FOR
		SELECT *
		FROM tbl_ptinf
			WHERE   HOSPID      =   :HOSPID  AND
					PTID  		=   :PTID
			ORDER BY PTNAME
		;
	};
	DBFETCH {
		FETCH tbl_ptinf_key_csr CURSOR FOR
			INTO
				:HOSPID,
				:PTID,
				:NAME
		;
	};
	DBUPDATE {
		UPDATE tbl_ptinf
			SET
				HOSPID = :HOSPID,
				PTID = :PTID,
				PTNAME = :NAME
			WHERE HOSPID = :HOSPID
			AND PTID = :PTID
		;
	};
};
--------------------------------------

-- 
KOBAYASHI, Shinji <skoba@xxxxxxxxxxxxxxxxxxxxxxx>