<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package rpicseuc;

;#--- pod Start -----------------------------------------------------------#
=pod

=head1 NAME

rpicseuc.pm - 共通サブルーチン群（EUCコードで接続）

=cut
;#--- pod Start -----------------------------------------------------------#

use rpics;
@ISA = qw(rpics);
use strict;
use DBI;
use Jcode;
#Hori require 'rpics.pl';

#------------------------------------------------------------------
sub new {
#------------------------------------------------------------------

=head2 ＤＢオープン [new]

webdb-param.plの内容でＤＢをオープンして
データベースハンドルを返す

=cut
	my $class = shift;
	my $self ;

####	my $user = 'erp_usr1';
####	my $user = 'test_usr1';

	# rpics.plファイルからID,Passwordを取得する  2008.6.11
#Hori	my @user_pass = split( /\// , OraConfig::initset() );
#Hori	my $user = $user_pass[0];
#Hori	my $pass = $user_pass[1];

	# shell変数セット
#Hori	local $ENV{ORACLE_HOME} = '/usr/lib/oracle/10.1.0.4/client';
#Hori	local $ENV{NLS_LANG} = 'JAPANESE_JAPAN.JA16EUC';
#Hori	local $ENV{NLS_LANGUAGE} = 'JAPANESE';

#Hori	eval{
#Hori		$self-&gt;{'dbh'} = DBI-&gt;connect('dbi:Oracle:rpics',$user,$pass)
#Hori			or die $DBI::errstr;
#Hori	};
	bless $self,$class;
	$self-&gt;{wh} = '80031';
#Hori	$self-&gt;{user} = lc($user);	# ｢RPiCSは---環境です｣の表示条件が小文字

	return  $self ;
}
#---------------------------------------------------------------#
sub look_up{
#---------------------------------------------------------------#

=head2 look_up

参照テーブルを参照する。

=cut

	my $s =shift;
	my ($sql,$para) = @_;
	my @para;
	for (@$para){
		if(ref($_) eq 'CODE'){
			push @para,&amp;$_;
		}else{ push @para,$_;
		}
	}
	my $sth = $s-&gt;{dbh}-&gt;prepare(qq{$sql});
	$sth-&gt;execute(@para);
	my $ref = $sth-&gt;fetchrow_arrayref();
	return $ref;
}
sub Xeuc2sj{
	my $s = shift;
	my $text = shift;
	return $text;
}
sub Xsj2euc{
	my $s = shift;
	my $text = shift;
	return $text;
}
1;
__END__

=head1 AUTHOR INFORMATION

 ;######################################################################
 ;#
 ;# rpicseuc.pm: R-PiCS ACCESS Sub Routine (EUC).
 ;#
 ;# Copyright (c) 2007 Chihiro Suzuki &lt;suzu@japannet.co.jp&gt;
 ;# JapanNet. All Rights Reserved.
 ;#
 ;#
 ;######################################################################

=cut

</pre></body></html>