Commit ce0dd3dc by lsk

Platform.dbFetchFiles参数类型修改

parent 7f1c90c2
#Mon Oct 18 18:02:27 CST 2021
#Fri Oct 22 17:29:20 CST 2021
LastTarget=eIBS
ScalePercent=80
DefaultTransName=ditopn
......
......@@ -4,7 +4,9 @@ int getTrsUsrCount(String arginr)
String sql = "Select count(*) CNT from TRS where OBJTYP = 'TRN' and OBJINR = " + Platform.sqlLit( arginr );
int cnt = 0;
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "CNT", cnt );
Argument<Integer> cntBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "CNT", cntBox );
cnt=cntBox.value;
if( Platform.errorCode() > 0 )
{
Platform.reraise();
......
......@@ -4,7 +4,9 @@ boolean checkPDP(#trn argtrn)
// Scan TRO for records with TRNINR=OBJINR,
// check wether predecessors are committed
Platform.dbExecuteSQL( "select INIFRM || ':'|| OWNREF REF from trn where inr in (select prvinr from tro where TRNINR= ? ) and relflg <> 'R' and relflg <> 'F' ", $$argtrn\inr.getValue() );
Platform.dbFetchFields( "", ref );
Argument<String> refBox = new Argument<String>("","");
Platform.dbFetchFields( "", refBox );
ref=refBox.value;
if( Platform.errorCode() > 0 )
{
if( Platform.errorCode() != tdOdbcNotFound )
......
......@@ -2,7 +2,9 @@ String getMsgTyp(String trninr)
{
String msgtyp = "";
Platform.dbExecuteSql( "select MSGTYP from SMH where TRNINR = '" + trninr + "' and (MSGTYP='MT103' or MSGTYP='MT202') and DIR='>'" );
Platform.dbFetchFields( "", msgtyp );
Argument<String> msgtypBox = new Argument<String>("","");
Platform.dbFetchFields( "", msgtypBox );
msgtyp=msgtypBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -5,14 +5,18 @@ static boolean checkBetset(#trn argtrn)
String clrref = "";
String sql = "select ownref from clr where smhinr in ( select inr from (select inr from smh where f21 = ? and msgtyp in ('202','910') order by inr desc ) where rownum=1)";
Platform.dbExecuteSQL( sql, ownref );
Platform.dbFetchFields( "", clrref );
Argument<String> clrrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", clrrefBox );
clrref=clrrefBox.value;
int err = Platform.errorCode();
Platform.dbCloseCursor();
if( ! Platform.isEmpty( clrref ) )
{
sql = " select relflg from trn where ownref= ? ";
Platform.dbExecuteSQL( sql, clrref );
Platform.dbFetchFields( "", relflg );
Argument<String> relflgBox = new Argument<String>("","");
Platform.dbFetchFields( "", relflgBox );
relflg=relflgBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.compareTo( relflg , "R" ) == 0 || Platform.compareTo( relflg , "F" ) == 0 )
......@@ -28,14 +32,18 @@ static boolean checkBetset(#trn argtrn)
{
sql = "select ownref from clr where selconref = ? ";
Platform.dbExecuteSQL( sql, ownref );
Platform.dbFetchFields( "", clrref );
//Argument<String> clrrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", clrrefBox );
clrref=clrrefBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
if( ! Platform.isEmpty( clrref ) )
{
sql = " select relflg from trn where ownref= ? ";
Platform.dbExecuteSQL( sql, clrref );
Platform.dbFetchFields( "", relflg );
Argument<String> relflgBox = new Argument<String>("","");
Platform.dbFetchFields( "", relflgBox );
relflg=relflgBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.compareTo( relflg , "R" ) == 0 || Platform.compareTo( relflg , "F" ) == 0 )
......
......@@ -4,7 +4,9 @@ void checkDKD(String ref,Argument<String> jjh)
String vjjh = "";
String sql = "select dkd.jjh from dkd dkd,trn trn where dkd.ownref='" + ref + "' and trn.objtyp='DKD' and trn.objinr=dkd.inr and trn.relflg in ('R','F') ";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", vjjh );
Argument<String> vjjhBox = new Argument<String>("","");
Platform.dbFetchFields( "", vjjhBox );
vjjh=vjjhBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -9,7 +9,9 @@ void getrelousta(Argument<String> sta,String branchinr,String relres2)
bch = "";
sql = "select branch from bch where inr='" + branchinr + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", bch );
Argument<String> bchBox = new Argument<String>("","");
Platform.dbFetchFields( "", bchBox );
bch=bchBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.compareTo( bch , "6203" ) == 0 && Platform.compareTo( relres2 , "NA" ) == 0 )
......
......@@ -304,7 +304,9 @@ void gleXrtChgBeforRelease(String trninr)
extkeynam = "";
sql = "select ADR1 from ADR where extkey='" + $gledel\cliextkey.getValue() + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", extkeynam );
Argument<String> extkeynamBox = new Argument<String>("","");
Platform.dbFetchFields( "", extkeynamBox );
extkeynam=extkeynamBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
$gledel\extkeynam = extkeynam;
......
......@@ -15,7 +15,9 @@ static boolean checkgletimeandamt(String trninr)
int count = 0;
String sql = "select count(*) from GLE where DBTDFT='FX' and TRNINR='" + trninr + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", count );
Argument<Integer> countBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "", countBox );
count=countBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
int sumamt = 0;
......@@ -33,19 +35,25 @@ static boolean checkgletimeandamt(String trninr)
sql = "select sum(case when syscur='CNY' then sysAMT else amt end) from gle where DBTDFT='FX' and (sysCUR='CNY' or CUR='CNY') and WHMTYP='3' and TRNinr='" + trninr + "'";
sumamt = 0;
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", sumamt );
Argument<Integer> sumamtBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "", sumamtBox );
sumamt=sumamtBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
sql1 = "select sum(case when syscur='CNY' then sysAMT else amt end) from gle where DBTDFT='FX' and (sysCUR='CNY' or CUR='CNY') and WHMTYP='5' and TRNinr='" + trninr + "'";
sumamt1 = 0;
Platform.dbExecuteSql( sql1 );
Platform.dbFetchFields( "", sumamt1 );
Argument<Integer> sumamt1Box = new Argument<Integer>("",0);
Platform.dbFetchFields( "", sumamt1Box );
sumamt1=sumamt1Box.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
sql2 = "select SUM(SYSAMT*excrat) from gle where DBTDFT='FX' and WHMTYP not in ('3','5') and TRNinr='" + trninr + "'";
sumamt2 = 0;
Platform.dbExecuteSql( sql2 );
Platform.dbFetchFields( "", sumamt2 );
Argument<Integer> sumamt2Box = new Argument<Integer>("",0);
Platform.dbFetchFields( "", sumamt2Box );
sumamt2=sumamt2Box.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
time = Platform.DateTimeGetTime( Platform.toDay() );
......
......@@ -376,7 +376,9 @@ void gleXrtChgAfterRelease(String trninr,Argument<Boolean> getxrtreturn)
extkeynam = "";
sql = "select ADR1 from ADR where extkey='" + $gledel\cliextkey.getValue() + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", extkeynam );
Argument<String> extkeynamBox = new Argument<String>("","");
Platform.dbFetchFields( "", extkeynamBox );
extkeynam=extkeynamBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
$gledel\extkeynam = extkeynam;
......
......@@ -78,7 +78,13 @@ void setMLI(String id,String apf,String ptyinr)
boolean continueVar = true;
while( continueVar )
{
Platform.dbFetchFields( "PTAINR", ptainr, "CORTYP", cortyp, "ORIFLG", oriflg );
Argument<String> ptainrBox = new Argument<String>("","");
Argument<String> cortypBox = new Argument<String>("","");
Argument<String> oriflgBox = new Argument<String>("","");
Platform.dbFetchFields( "PTAINR", ptainrBox, "CORTYP", cortypBox, "ORIFLG", oriflgBox );
ptainr=ptainrBox.value;
cortyp=cortypBox.value;
oriflg=oriflgBox.value;
if( Platform.errorCode() <= 0 )
{
if( Platform.compareTo(oriflg, "S") != 0 )
......
......@@ -75,7 +75,9 @@ void fillCONDOCSTM()
Platform.dbExecuteSQL( "select INIFRM from TRN where INR = ?", trnInr );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "", iniFrm );
Argument<String> iniFrmBox = new Argument<String>("","");
Platform.dbFetchFields( "", iniFrmBox );
iniFrm=iniFrmBox.value;
error = Platform.errorCode();
}
Platform.dbCloseCursor();
......
......@@ -82,7 +82,9 @@ static void getStandardReference(Argument<String> ownref,String sector,String pn
if( Platform.errorCode() <= 0 )
{
// fetch field if no error on executing SQL-Statement
Platform.dbFetchFields( "INR", inr );
Argument<String> inrBox = new Argument<String>("","");
Platform.dbFetchFields( "INR", inrBox );
inr=inrBox.value;
// If entry not found
// - use this reference
if( Platform.errorCode() == tdOdbcNotFound )
......
......@@ -16,7 +16,9 @@ void getgrpnew(String sec,String bchkey,String branch,Argument<String> grp)
int pos = 0;
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", trlgrp );
Argument<String> trlgrpBox = new Argument<String>("","");
Platform.dbFetchFields( "", trlgrpBox );
trlgrp=trlgrpBox.value;
if( Platform.errorCode() == 0 )
{
pos = Platform.pos( trlgrp, "B" );
......
......@@ -11,7 +11,9 @@ boolean existGLE()
Platform.dbExecuteSql( sql );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "CNT", count );
Argument<Integer> countBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "CNT", countBox );
count=countBox.value;
Platform.dbCloseCursor();
if( count == 0 )
{
......
......@@ -6,7 +6,9 @@ boolean isExistRET()
Platform.dbExecuteSql( sql );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "CNT", count );
Argument<Integer> countBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "CNT", countBox );
count=countBox.value;
Platform.dbCloseCursor();
if( count == 0 )
{
......
......@@ -20,7 +20,9 @@ boolean isSendSms()
smssql = "select inr from sms where trninr='" + cortrninr + "' and sndflag in('0','1') ";
Platform.dbExecuteSql( smssql );
err = Platform.errorCode();
Platform.dbFetchFields( "", smsinr );
Argument<String> smsinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", smsinrBox );
smsinr=smsinrBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( ! Platform.isEmpty( smsinr ) )
......@@ -30,7 +32,9 @@ boolean isSendSms()
trnsql = "select cortrninr from trn where inr='" + cortrninr + "' ";
Platform.dbExecuteSql( trnsql );
err = Platform.errorCode();
Platform.dbFetchFields( "", cortrninr );
Argument<String> cortrninrBox = new Argument<String>("","");
Platform.dbFetchFields( "", cortrninrBox );
cortrninr=cortrninrBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( Platform.isEmpty( cortrninr ) )
......
......@@ -19,7 +19,9 @@ String getOwnPtaInr()
Platform.dbExecuteSql( sql );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<String>("","");
Platform.dbFetchFields( "", inrBox );
inr=inrBox.value;
if( Platform.errorCode() == 0 )
{
Platform.dbCloseCursor();
......
......@@ -10,7 +10,11 @@ String getTextOfInrTable(String tableid,String tableinr,String fieldid)
{
fld = "";
Platform.dbExecuteSQL( "SELECT " + fieldid + " from " + tableid + " WHERE INR = ?", tableinr );
Platform.dbFetchFields( fieldid, fld );
Argument<String> fieldidBox = new Argument<String>("","");
//Argument<String> fldBox = new Argument<String>("","");
Platform.dbFetchFields( fieldidBox, fldBox );
fieldid=fieldidBox.value;
fld=fldBox.value;
if( Platform.errorCode() == tdOdbcNotFound )
{
fld = "";
......
......@@ -16,7 +16,27 @@ void getOwnENadr(Argument<String> loczip,Argument<String> adrstr,Argument<String
bchkey = $\sysmod\bch\bchkey;
String strsql = "select adr.pobzip,adr.nam1,adr.nam2,adr.nam3,adr.str1,adr.str2,adr.loccty,adr.tel1,adr.tel2,adr.fax1,adr.fax2 from adr,bch where adr.bic=bch.swfcod and bch.lev='" + lev + "' and bchkey='" + bchkey + "'";
Platform.dbExecuteSql( strsql );
Platform.dbFetchFields( "pobzip", loczip.value, "nam1", nam1, "nam2", nam2, "nam3", nam3, "str1", str1, "str2", str2, "loccty", vloccty, "tel1", vtel1, "tel2", vtel2, "fax1", vfax1, "fax2", vfax2 );
Argument<String> nam1Box = new Argument<String>("","");
Argument<String> nam2Box = new Argument<String>("","");
Argument<String> nam3Box = new Argument<String>("","");
Argument<String> str1Box = new Argument<String>("","");
Argument<String> str2Box = new Argument<String>("","");
Argument<String> vlocctyBox = new Argument<String>("","");
Argument<String> vtel1Box = new Argument<String>("","");
Argument<String> vtel2Box = new Argument<String>("","");
Argument<String> vfax1Box = new Argument<String>("","");
Argument<String> vfax2Box = new Argument<String>("","");
Platform.dbFetchFields( "pobzip", loczip.value, "nam1", nam1Box, "nam2", nam2Box, "nam3", nam3Box, "str1", str1Box, "str2", str2Box, "loccty", vlocctyBox, "tel1", vtel1Box, "tel2", vtel2Box, "fax1", vfax1Box, "fax2", vfax2Box );
nam1=nam1Box.value;
nam2=nam2Box.value;
nam3=nam3Box.value;
str1=str1Box.value;
str2=str2Box.value;
vloccty=vlocctyBox.value;
vtel1=vtel1Box.value;
vtel2=vtel2Box.value;
vfax1=vfax1Box.value;
vfax2=vfax2Box.value;
if( Platform.errorCode() <= 0 )
{
adrstr.value = nam1 + nam2 + nam3 + str1 + str2;
......
......@@ -6,7 +6,9 @@ void savTnn()
Platform.dbExecuteSql( sql );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "CNT", count );
Argument<Integer> countBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "CNT", countBox );
count=countBox.value;
Platform.dbCloseCursor();
if( count == 0 )
{
......@@ -27,7 +29,9 @@ void savTnn()
Platform.dbExecuteSql( sql1 );
if( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "CNT", count1 );
Argument<Integer> count1Box = new Argument<Integer>("",0);
Platform.dbFetchFields( "CNT", count1Box );
count1=count1Box.value;
Platform.dbCloseCursor();
if( count1 == 0 )
{
......
......@@ -13,7 +13,9 @@ String getHADPtaInr()
Platform.dbExecuteSql( sql );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<String>("","");
Platform.dbFetchFields( "", inrBox );
inr=inrBox.value;
if( Platform.errorCode() == 0 )
{
Platform.dbCloseCursor();
......@@ -31,7 +33,9 @@ String getHADPtaInr()
Platform.dbExecuteSql( sql );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<String>("","");
Platform.dbFetchFields( "", inrBox );
inr=inrBox.value;
if( Platform.errorCode() == 0 )
{
Platform.dbCloseCursor();
......
......@@ -25,7 +25,9 @@ void checkNetFrm(IModule obj)
sptfrm = "";
sptsql = "select count(1) cou from spt where objref='" + ref + "' and sta='TCO' and trim(inftxt) is null ";
Platform.dbExecuteSql( sptsql );
Platform.dbFetchFields( "cou", cou );
Argument<Integer> couBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "cou", couBox );
cou=couBox.value;
if( Platform.errorCode() <= 0 )
{
}
......@@ -36,7 +38,9 @@ void checkNetFrm(IModule obj)
{
sptsql = "select frm from spt where objref='" + ref + "' and sta='TCO' and trim(inftxt) is null ";
Platform.dbExecuteSql( sptsql );
Platform.dbFetchFields( "frm", sptfrm );
Argument<String> sptfrmBox = new Argument<String>("","");
Platform.dbFetchFields( "frm", sptfrmBox );
sptfrm=sptfrmBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.isEmpty( $\sysmod\spt\sta ) && Platform.compareTo( frm , sptfrm ) == 0 )
......
......@@ -24,7 +24,9 @@ void checkFrmAme(IModule obj)
{
trnsql = " select relflg from (select * from trn where ownref='" + ref + "' and inifrm='BCTAME' order by inr desc) where rownum=1 ";
Platform.dbExecuteSql( trnsql );
Platform.dbFetchFields( "relflg", relflg );
Argument<String> relflgBox = new Argument<String>("","");
Platform.dbFetchFields( "relflg", relflgBox );
relflg=relflgBox.value;
if( Platform.errorCode() <= 0 )
{
}
......@@ -36,7 +38,9 @@ void checkFrmAme(IModule obj)
{
trnsql = " select relflg from (select * from trn where ownref='" + ref + "' and inifrm='BRTDCK' order by inr desc) where rownum=1 ";
Platform.dbExecuteSql( trnsql );
Platform.dbFetchFields( "relflg", relflg );
Argument<String> relflgBox = new Argument<String>("","");
Platform.dbFetchFields( "relflg", relflgBox );
relflg=relflgBox.value;
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -13,7 +13,17 @@ void sendSMS(#spt argaccspt)
String idtype = "";
String act59 = Platform.trim( $$argaccspt\act59.getValue() );
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype );
Argument<String> tel2Box = new Argument<String>("","");
Argument<String> adr1Box = new Argument<String>("","");
Argument<String> adr2Box = new Argument<String>("","");
Argument<String> fax2Box = new Argument<String>("","");
Argument<String> idtypeBox = new Argument<String>("","");
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2=tel2Box.value;
adr1=adr1Box.value;
adr2=adr2Box.value;
fax2=fax2Box.value;
idtype=idtypeBox.value;
int ignore = Platform.errorCode();
Platform.dbCloseCursor();
$trnism\wfmmod\srv\srvsms\sms\telno = tel2;
......
......@@ -13,7 +13,17 @@ void sendfailSMS(#spt argaccspt)
String idtype = "";
String act59 = Platform.trim( $$argaccspt\act59.getValue() );
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel2, "", adr1, "", adr2, "", fax2, "", idtype );
Argument<String> tel2Box = new Argument<String>("","");
Argument<String> adr1Box = new Argument<String>("","");
Argument<String> adr2Box = new Argument<String>("","");
Argument<String> fax2Box = new Argument<String>("","");
Argument<String> idtypeBox = new Argument<String>("","");
Platform.dbFetchFields( "", tel2Box, "", adr1Box, "", adr2Box, "", fax2Box, "", idtypeBox );
tel2=tel2Box.value;
adr1=adr1Box.value;
adr2=adr2Box.value;
fax2=fax2Box.value;
idtype=idtypeBox.value;
int ignore = Platform.errorCode();
Platform.dbCloseCursor();
$trnism\wfmmod\srv\srvsms\sms\telno = tel2;
......
......@@ -90,7 +90,9 @@ void defaultTRNP()
text = "";
sqltext = "select rptno from dba where buscode=(select ownref from trn where inr='" + $trn\inr.getValue() + "')";
Platform.dbExecuteSql( sqltext );
Platform.dbFetchFields( "", text );
Argument<String> textBox = new Argument<String>("","");
Platform.dbFetchFields( "", textBox );
text=textBox.value;
if( Platform.errorCode() <= 0 )
{
}
......@@ -104,7 +106,9 @@ void defaultTRNP()
strsql = "select refnos from dbm where rptno in(select rptno from dba where buscode=(select ownref from trn where inr='" + $trn\inr.getValue() + "'))";
}
Platform.dbExecuteSql( strsql );
Platform.dbFetchFields( "", refnos );
Argument<String> refnosBox = new Argument<String>("","");
Platform.dbFetchFields( "", refnosBox );
refnos=refnosBox.value;
if( Platform.errorCode() <= 0 )
{
}
......
......@@ -29,7 +29,15 @@ void loadTRSSTM()
begdat = "";
action = "";
Platform.dbExecuteSQL( sql, $trn\inifrm.getValue(), $trn\ordinr.getValue() );
Platform.dbFetchFields( "", action, "", usr, "", begdat, "", typ );
Argument<String> actionBox = new Argument<String>("","");
Argument<String> usrBox = new Argument<String>("","");
Argument<String> begdatBox = new Argument<String>("","");
Argument<String> typBox = new Argument<String>("","");
Platform.dbFetchFields( "", actionBox, "", usrBox, "", begdatBox, "", typBox );
action=actionBox.value;
usr=usrBox.value;
begdat=begdatBox.value;
typ=typBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
line = typ + "\t" + usr + "\t" + begdat + "\t" + action;
......@@ -45,7 +53,15 @@ void loadTRSSTM()
begdat = "";
action = "";
Platform.dbExecuteSQL( sql, $trn\ordinr.getValue() );
Platform.dbFetchFields( "", action, "", usr, "", begdat, "", typ );
//Argument<String> actionBox = new Argument<String>("","");
//Argument<String> usrBox = new Argument<String>("","");
//Argument<String> begdatBox = new Argument<String>("","");
//Argument<String> typBox = new Argument<String>("","");
Platform.dbFetchFields( "", actionBox, "", usrBox, "", begdatBox, "", typBox );
action=actionBox.value;
usr=usrBox.value;
begdat=begdatBox.value;
typ=typBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
line = typ + "\t" + usr + "\t" + begdat + "\t" + action;
......
......@@ -41,7 +41,9 @@ event $cacrow order 1000
//$Sql = "select acginr from acg where trninr='RG000184
sql = "select creinr from acg where trninr='" + $trn\inr.getValue() + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", itfinr );
Argument<String> itfinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", itfinrBox );
itfinr=itfinrBox.value;
Platform.dbCloseCursor();
error1 = Platform.errorCode();
}
......
......@@ -11,7 +11,9 @@ default $shwdeb order 1000
sql = "select DISTINCT CDESTA from CDE " + sql;
Platform.dbExecuteSql( sql );
errcode = Platform.errorCode();
Platform.dbFetchFields( "CDESTA", cdesta );
Argument<String> cdestaBox = new Argument<String>("","");
Platform.dbFetchFields( "CDESTA", cdestaBox );
cdesta=cdestaBox.value;
errcode2 = Platform.errorCode();
if( errcode2 == 0 )
{
......
......@@ -10,7 +10,9 @@ default $smssnd order 1000
sql = "select SNDFLAG from SMS WHERE TRNINR='" + $trn\inr.getValue() + "' ";
Platform.dbExecuteSql( sql );
errcode = Platform.errorCode();
Platform.dbFetchFields( "", sndflag );
Argument<String> sndflagBox = new Argument<String>("","");
Platform.dbFetchFields( "", sndflagBox );
sndflag=sndflagBox.value;
errcode2 = Platform.errorCode();
if( errcode2 == 0 )
{
......@@ -37,7 +39,9 @@ default $smssnd order 1000
f79sta = "";
Platform.dbExecuteSql( sql );
errcode = Platform.errorCode();
Platform.dbFetchFields( "", f79sta );
Argument<String> f79staBox = new Argument<String>("","");
Platform.dbFetchFields( "", f79staBox );
f79sta=f79staBox.value;
errcode2 = Platform.errorCode();
if( ! Platform.isEmpty( f79sta ) )
{
......
......@@ -36,14 +36,18 @@ String branchsqlAndUp()
break enddoLabel;
}
String branch = "";
Platform.dbFetchFields( "", branch );
Argument<String> branchBox = new Argument<String>("","");
Platform.dbFetchFields( "", branchBox );
branch=branchBox.value;
while( Platform.errorCode() == 0 )
{
if( Platform.streamSearch( $bchstream, branch ) <= 0 )
{
Platform.streamInsert( $bchstream.getValue(), 0, branch );
}
Platform.dbFetchFields( "", branch );
//Argument<String> branchBox = new Argument<String>("","");
Platform.dbFetchFields( "", branchBox );
branch=branchBox.value;
}
Platform.dbCloseCursor();
break enddoLabel;
......
......@@ -32,7 +32,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqllid = "SELECT PNTINR FROM BRD WHERE OWNREF='" + brkey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqllid );
Platform.dbFetchFields( "", pntinr );
Argument<String> pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -41,7 +43,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqlliownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
lidref = "";
Platform.dbExecuteSql( sqlliownref );
Platform.dbFetchFields( "", lidref );
Argument<String> lidrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", lidrefBox );
lidref=lidrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -61,7 +65,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqlled = "SELECT PNTINR FROM BED WHERE OWNREF='" + bekey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqlled );
Platform.dbFetchFields( "", pntinr );
Argument<String> pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -70,7 +76,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqlleownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
ledref = "";
Platform.dbExecuteSql( sqlleownref );
Platform.dbFetchFields( "", ledref );
Argument<String> ledrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", ledrefBox );
ledref=ledrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -91,7 +99,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqlled = "SELECT PNTINR FROM BED WHERE OWNREF='" + bekey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqlled );
Platform.dbFetchFields( "", pntinr );
Argument<String> pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -100,7 +110,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqlleownref = "SELECT OWNREF FROM LED WHERE INR='" + pntinr + "'";
ledref = "";
Platform.dbExecuteSql( sqlleownref );
Platform.dbFetchFields( "", ledref );
Argument<String> ledrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", ledrefBox );
ledref=ledrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -118,7 +130,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqllid = "SELECT PNTINR FROM BRD WHERE SHGREF='" + brkey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqllid );
Platform.dbFetchFields( "", pntinr );
pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -127,7 +141,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqlliownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
lidref = "";
Platform.dbExecuteSql( sqlliownref );
Platform.dbFetchFields( "", lidref );
Argument<String> lidrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", lidrefBox );
lidref=lidrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -145,7 +161,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqllid = "SELECT PNTINR FROM BRD WHERE OWNREF='" + brkey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqllid );
Platform.dbFetchFields( "", pntinr );
pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -154,7 +172,9 @@ void historyimageKey(Argument<String> key,Argument<String> typ)
sqlliownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
lidref = "";
Platform.dbExecuteSql( sqlliownref );
Platform.dbFetchFields( "", lidref );
lidrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", lidrefBox );
lidref=lidrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -21,11 +21,19 @@ default $usrcon order 1000
Platform.streamClear( b );
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( bchsql );
Platform.dbFetchFields( "", extkey, "", nam );
Argument<String> extkeyBox = new Argument<String>("","");
Argument<String> namBox = new Argument<String>("","");
Platform.dbFetchFields( "", extkeyBox, "", namBox );
extkey=extkeyBox.value;
nam=namBox.value;
while( Platform.errorCode() == 0 )
{
Platform.streamInsert( b, 0, extkey + "\t" + nam );
Platform.dbFetchFields( "", extkey, "", nam );
//Argument<String> extkeyBox = new Argument<String>("","");
//Argument<String> namBox = new Argument<String>("","");
Platform.dbFetchFields( "", extkeyBox, "", namBox );
extkey=extkeyBox.value;
nam=namBox.value;
}
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -15,7 +15,9 @@ event $undo order 1000
inr = "";
sql = "select inr from SMH where TRNinr=? and DIR = '>' and cortyp='SWT' and msgtyp in ('202','103','910','199','299') and sndstatus='0' AND NAM NOT LIKE '%GPI%'";
Platform.dbExecuteSQL( sql, $trn\inr.getValue() );
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<String>("","");
Platform.dbFetchFields( "", inrBox );
inr=inrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -64,7 +64,9 @@ event $trncorco\trnstm order 1501
inr = "";
sql = "select inr from SMH where TRNinr=? and DIR = '>' and cortyp='SWT' and msgtyp in ('202','103','910','199','299') and sndstatus='0' AND NAM NOT LIKE '%GPI%'";
Platform.dbExecuteSQL( sql, $trn\inr.getValue() );
Platform.dbFetchFields( "", inr );
Argument<String> inrBox = new Argument<String>("","");
Platform.dbFetchFields( "", inrBox );
inr=inrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -105,7 +107,9 @@ event $trncorco\trnstm order 1501
errcode = Platform.errorCode();
if( errcode <= 0 )
{
Platform.dbFetchFields( "CDESTA", cdesta );
Argument<String> cdestaBox = new Argument<String>("","");
Platform.dbFetchFields( "CDESTA", cdestaBox );
cdesta=cdestaBox.value;
errcode2 = Platform.errorCode();
if( errcode2 == 0 )
{
......
......@@ -65,7 +65,9 @@ void undoMSG()
sql = "select creinr from acg where trninr='" + trninr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", itfinr );
Argument<String> itfinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", itfinrBox );
itfinr=itfinrBox.value;
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
error1 = Platform.errorCode();
......@@ -73,7 +75,9 @@ void undoMSG()
//$newinr = ( $trninr )
//通过trninr读取GLE,判断是不是有账务信息,有冲账,没有跳过
Platform.dbExecuteSql( "select distinct branchinr from gle where trninr ='" + $trn\inr.getValue() + "'" );
Platform.dbFetchFields( "", branchinr );
Argument<String> branchinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", branchinrBox );
branchinr=branchinrBox.value;
if( Platform.errorCode() == tdOdbcNotFound )
{
hxflg = 0;
......
......@@ -6,7 +6,15 @@ void undoUpdatetoTRN(String inr)
String req2 = "";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( "select RELREQ,RELREQ0,RELREQ1,RELREQ2 branchinr from trn where inr ='" + inr + "'" );
Platform.dbFetchFields( "", req, "", req0, "", req1, "", req2 );
Argument<String> reqBox = new Argument<String>("","");
Argument<String> req0Box = new Argument<String>("","");
Argument<String> req1Box = new Argument<String>("","");
Argument<String> req2Box = new Argument<String>("","");
Platform.dbFetchFields( "", reqBox, "", req0Box, "", req1Box, "", req2Box );
req=reqBox.value;
req=req0Box.value;
req=req1Box.value;
req=req2Box.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -182,7 +182,13 @@ event $udapl order 1000
sql = "select jjh , bchkey , usrnam from dkd where inr='" + $trn\objinr.getValue() + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", jjh, "", bchkey, "", usrnam );
Argument<String> jjhBox = new Argument<String>("","");
Argument<String> bchkeyBox = new Argument<String>("","");
Argument<String> usrnamBox = new Argument<String>("","");
Platform.dbFetchFields( "", jjhBox, "", bchkeyBox, "", usrnamBox );
jjh=jjhBox.value;
bchkey=bchkeyBox.value;
usrnam=usrnamBox.value;
error1 = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -213,7 +219,11 @@ event $udapl order 1000
sql = "select creinr, acginr from acg where trninr='" + trninr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", creinr, "", itfinr );
Argument<String> creinrBox = new Argument<String>("","");
Argument<String> itfinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", creinrBox, "", itfinrBox );
creinr=creinrBox.value;
itfinr=itfinrBox.value;
error1 = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -222,7 +232,9 @@ event $udapl order 1000
//$newinr = ( $trninr )
//通过trninr读取GLE,判断是不是有账务信息,有冲账,没有跳过
Platform.dbExecuteSql( "select distinct branchinr from gle where trninr ='" + $trn\inr.getValue() + "'" );
Platform.dbFetchFields( "", branchinr );
Argument<String> branchinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", branchinrBox );
branchinr=branchinrBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound )
{
......
......@@ -29,7 +29,9 @@ event $udhd order 1000
creinr = "";
date = null;
Platform.dbExecuteSql( sqlforacg );
Platform.dbFetchFields( "CREINR", creinr, "OPNDAT", date );
Argument<String> creinrBox = new Argument<String>("","");
Platform.dbFetchFields( "CREINR", creinrBox, "OPNDAT", date );
creinr=creinrBox.value;
Platform.dbCloseCursor();
error1 = Platform.errorCode();
date2 = Platform.format( date, "YYYY-MM-DD" );
......
......@@ -10,7 +10,9 @@ default $recpan\shwceb order 1000
sql = "SELECT DISTINCT(ITFRTN) FROM XID WHERE INTTYP='FAM' AND TRNINR=" + Platform.sqlLit( trninr );
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", fxqsta );
Argument<String> fxqstaBox = new Argument<String>("","");
Platform.dbFetchFields( "", fxqstaBox );
fxqsta=fxqstaBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( Platform.compareTo( fxqsta , "E" ) == 0 )
......
......@@ -11,14 +11,18 @@ default undotrnbut ($udhd,$udfxq) order 1000
sqlfxq = "SELECT DISTINCT(ITFRTN) FROM XID WHERE INTTYP='FAM' AND TRNINR=" + Platform.sqlLit( $trn\inr.getValue() );
Platform.dbExecuteSql( sqlfxq );
err = Platform.errorCode();
Platform.dbFetchFields( "", fxqsta );
Argument<String> fxqstaBox = new Argument<String>("","");
Platform.dbFetchFields( "", fxqstaBox );
fxqsta=fxqstaBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
retsta = "";
sqlret = "SELECT DISTINCT(CDESTA) FROM CDE WHERE TRNINR=" + Platform.sqlLit( $trn\inr.getValue() );
Platform.dbExecuteSql( sqlret );
err = Platform.errorCode();
Platform.dbFetchFields( "", retsta );
Argument<String> retstaBox = new Argument<String>("","");
Platform.dbFetchFields( "", retstaBox );
retsta=retstaBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
if( Platform.compareTo($trn\xidflg.getValue(), "Y") != 0 && Platform.compareTo(fxqsta, "") != 0 )
......
......@@ -21,7 +21,11 @@ event $recpan\shwceb order 1000
ctycod = "";
sql = "SELECT trim(bopref),trim(ctycod) FROM XID WHERE INTTYP='FAM' AND TRNINR=" + Platform.sqlLit( trninr );
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", bopref, "", ctycod );
Argument<String> boprefBox = new Argument<String>("","");
Argument<String> ctycodBox = new Argument<String>("","");
Platform.dbFetchFields( "", boprefBox, "", ctycodBox );
bopref=boprefBox.value;
ctycod=ctycodBox.value;
Platform.dbCloseCursor();
if( Platform.errorCode() == tdOdbcNotFound )
{
......
......@@ -28,7 +28,9 @@ event $recpan\shwdeb order 1000
date = null;
errmsg = "";
Platform.dbExecuteSql( sqlforacg );
Platform.dbFetchFields( "CREINR", creinr, "OPNDAT", date );
Argument<String> creinrBox = new Argument<String>("","");
Platform.dbFetchFields( "CREINR", creinrBox, "OPNDAT", date );
creinr=creinrBox.value;
Platform.dbCloseCursor();
error1 = Platform.errorCode();
date2 = Platform.format( date, "YYYY-MM-DD" );
......
......@@ -7,7 +7,9 @@ String getServiceWfe(String service,#trn arg)
Platform.dbExecuteSql( sql );
if( Platform.errorCode() == 0 )
{
Platform.dbFetchFields( #CT000302, m );
Argument<Integer> mBox = new Argument<Integer>("",0);
Platform.dbFetchFields( #CT000302, mBox );
m=mBox.value;
if( m > 0 )
{
$recpan\wfmmod.readByObj ( "TRN", $$arg\inr.getValue() );
......
......@@ -9,7 +9,17 @@ boolean checkRelbopTrn(String trninrr)
Platform.sqlSetDirtyRead();
String sql = "select bassta,dclsta,vrfsta,objtyp,objinr from dbl where trninr='" + trninrr + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", bassta, "", dclsta, "", vrfsta, "", objtyp, "", objinr );
Argument<String> basstaBox = new Argument<String>("","");
Argument<String> dclstaBox = new Argument<String>("","");
Argument<String> vrfstaBox = new Argument<String>("","");
Argument<String> objtypBox = new Argument<String>("","");
Argument<String> objinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", basstaBox, "", dclstaBox, "", vrfstaBox, "", objtypBox, "", objinrBox );
bassta=basstaBox.value;
dclsta=dclstaBox.value;
vrfsta=vrfstaBox.value;
objtyp=objtypBox.value;
objinr=objinrBox.value;
int error1 = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -26,7 +36,9 @@ boolean checkRelbopTrn(String trninrr)
sql = "select actiontype from " + objtyp + " where inr='" + objinr + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", actiontype );
Argument<String> actiontypeBox = new Argument<String>("","");
Platform.dbFetchFields( "", actiontypeBox );
actiontype=actiontypeBox.value;
error1 = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -23,7 +23,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqllid = "SELECT PNTINR FROM BRD WHERE OWNREF='" + brkey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqllid );
Platform.dbFetchFields( "", pntinr );
Argument<String> pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -32,7 +34,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqlliownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
lidref = "";
Platform.dbExecuteSql( sqlliownref );
Platform.dbFetchFields( "", lidref );
Argument<String> lidrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", lidrefBox );
lidref=lidrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -52,7 +56,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqlled = "SELECT PNTINR FROM BED WHERE OWNREF='" + bekey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqlled );
Platform.dbFetchFields( "", pntinr );
Argument<String> pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -61,7 +67,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqlleownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
ledref = "";
Platform.dbExecuteSql( sqlleownref );
Platform.dbFetchFields( "", ledref );
Argument<String> ledrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", ledrefBox );
ledref=ledrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -82,7 +90,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqlled = "SELECT PNTINR FROM BED WHERE OWNREF='" + bekey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqlled );
Platform.dbFetchFields( "", pntinr );
Argument<String> pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -91,7 +101,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqlleownref = "SELECT OWNREF FROM LED WHERE INR='" + pntinr + "'";
ledref = "";
Platform.dbExecuteSql( sqlleownref );
Platform.dbFetchFields( "", ledref );
Argument<String> ledrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", ledrefBox );
ledref=ledrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -109,7 +121,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqllid = "SELECT PNTINR FROM BRD WHERE SHGREF='" + brkey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqllid );
Platform.dbFetchFields( "", pntinr );
pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -118,7 +132,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqlliownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
lidref = "";
Platform.dbExecuteSql( sqlliownref );
Platform.dbFetchFields( "", lidref );
Argument<String> lidrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", lidrefBox );
lidref=lidrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -139,7 +155,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqllid = "SELECT PNTINR FROM BRD WHERE OWNREF='" + brkey + "'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sqllid );
Platform.dbFetchFields( "", pntinr );
pntinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", pntinrBox );
pntinr=pntinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......@@ -148,7 +166,9 @@ void historyimageKeyNet(Argument<String> key,Argument<String> typ)
sqlliownref = "SELECT OWNREF FROM LID WHERE INR='" + pntinr + "'";
lidref = "";
Platform.dbExecuteSql( sqlliownref );
Platform.dbFetchFields( "", lidref );
lidrefBox = new Argument<String>("","");
Platform.dbFetchFields( "", lidrefBox );
lidref=lidrefBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -72,7 +72,18 @@ event $smssend order 1000
sql = "select adr.tel7 , adr.adr1 , adr.fax7 ,LID.ownref,PTe.BEGDAT from adr , pts , LID,BRD ,PTEwhere adr.extkey=pts.extkey and adr.extkey=pts.extkey and pts.objtyp='BRD' aND pts.OBJINR=BRD.inr and pts.rol='APL' and BRD.inr=pts.OBJINR and BRD.inr='" + $trn\objinr.getValue() + "'" + "and LID.inr=BRD.PNTINR and BRD.PNTTYP='LID' and PTE.objtyp='PTS' and PTE.objinr=PTS.inr and PTE.CBTPFX='AKZ' and PTE.EXTID='AKZ/BR'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
//Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
Argument<String> tel1Box = new Argument<String>("","");
Argument<String> adr1Box = new Argument<String>("","");
Argument<String> fax1Box = new Argument<String>("","");
Argument<String> refBox = new Argument<String>("","");
//Argument<String> paydatBox = new Argument<String>("","");
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", refBox, "", paydat );
tel1=tel1Box.value;
adr1=adr1Box.value;
fax1=fax1Box.value;
ref=refBox.value;
//paydat=paydatBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -82,7 +93,18 @@ event $smssend order 1000
sql = "select adr.tel7 , adr.adr1 , adr.fax7 ,BCD.ownref,PTe.BEGDAT from adr , pts ,BCD ,PTE where adr.extkey=pts.extkey and adr.extkey=pts.extkey and pts.objtyp='BCD' aND pts.OBJINR=BCD.inr and pts.rol='DRE' and BCD.inr='" + $trn\objinr.getValue() + "'" + " and PTE.objtyp='PTS' and PTE.objinr=PTS.inr and PTE.CBTPFX='AKZ' and PTE.EXTID='AKZ/BC'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
//Platform.dbFetchFields( "", tel1, "", adr1, "", fax1, "", ref, "", paydat );
Argument<String> tel1Box = new Argument<String>("","");
Argument<String> adr1Box = new Argument<String>("","");
Argument<String> fax1Box = new Argument<String>("","");
Argument<String> refBox = new Argument<String>("","");
//Argument<String> paydatBox = new Argument<String>("","");
Platform.dbFetchFields( "", tel1Box, "", adr1Box, "", fax1Box, "", refBox, "", paydat );
tel1=tel1Box.value;
adr1=adr1Box.value;
fax1=fax1Box.value;
ref=refBox.value;
//paydat=paydatBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -9,7 +9,9 @@ void getrelousta(Argument<String> sta)
bch = "";
sql = "select branch from bch where inr='" + $trn\branchinr.getValue() + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", bch );
Argument<String> bchBox = new Argument<String>("","");
Platform.dbFetchFields( "", bchBox );
bch=bchBox.value;
err = Platform.errorCode();
Platform.dbCloseCursor();
if( Platform.compareTo( bch , "6203" ) == 0 && Platform.compareTo( $trn\relres2 , "NA" ) == 0 )
......
......@@ -20,7 +20,13 @@ void fetchDRG(Argument<String> extkeywg,Argument<String> rank,Argument<String> b
{
sql = "select juscod,idtype,loccty from pty left join adr on adr.extkey=pty.extkey where PTY.extkey='" + extkey + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", buscode, "", idtype, "", vcountry );
Argument<String> buscodeBox = new Argument<String>("","");
Argument<String> idtypeBox = new Argument<String>("","");
Argument<String> vcountryBox = new Argument<String>("","");
Platform.dbFetchFields( "", buscodeBox, "", idtypeBox, "", vcountryBox );
buscode=buscodeBox.value;
idtype=idtypeBox.value;
vcountry=vcountryBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
}
......@@ -32,7 +38,14 @@ void fetchDRG(Argument<String> extkeywg,Argument<String> rank,Argument<String> b
//只有转让证需要查询两个角色
sql = "select juscod,idtype,loccty from pty left join adr on adr.extkey=pty.extkey where PTY.extkey='" + vextkey2 + "'";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", vbuscode2, "", idtype2, "", vcountry2 );
//Platform.dbFetchFields( "", vbuscode2, "", idtype2, "", vcountry2 );
Argument<String> vbuscode2Box = new Argument<String>("","");
Argument<String> idtype2Box = new Argument<String>("","");
Argument<String> vcountry2Box = new Argument<String>("","");
Platform.dbFetchFields( "", vbuscode2Box, "", idtype2Box, "", vcountry2Box );
vbuscode2=vbuscode2Box.value;
idtype2=idtype2Box.value;
vcountry2=vcountry2Box.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
}
......
......@@ -5,7 +5,9 @@ boolean checktoday()
String sql = "select txt from STB where tbl='CHKTDY' and UIL='EN' and cod='FLG'";
Platform.sqlSetDirtyRead();
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", txt );
Argument<String> txtBox = new Argument<String>("","");
Platform.dbFetchFields( "", txtBox );
txt=txtBox.value;
int error = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -5,7 +5,9 @@ default $butsms order 1000
String sql = "select count(*) from SMS WHERE TRNINR='" + $trn\inr.getValue() + "' ";
Platform.dbExecuteSql( sql );
int errcode = Platform.errorCode();
Platform.dbFetchFields( "", sndflag );
Argument<Integer> sndflagBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "", sndflagBox );
sndflag=sndflagBox.value;
int errcode2 = Platform.errorCode();
Platform.dbCloseCursor();
if( sndflag > 0 )
......
......@@ -6,7 +6,9 @@ boolean checkRelAckTrn(String trninrr)
Platform.sqlSetDirtyRead();
String sqlcount = "select count(*) from trn t,smh s where t.inr =s.trninr and s.trntyp = 'TRN' and s.cortyp = 'SWT' and msgtyp in ('103','202','910') and s.dir = '>' and t.inr = '" + trninrr + "'";
Platform.dbExecuteSql( sqlcount );
Platform.dbFetchFields( "", countFlg );
Argument<String> countFlgBox = new Argument<String>("","");
Platform.dbFetchFields( "", countFlgBox );
countFlg=countFlgBox.value;
int error1 = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......@@ -15,7 +17,9 @@ boolean checkRelAckTrn(String trninrr)
{
sql = " select distinct sta from ack where objtyp = 'TRN' and objinr = '" + trninrr + "' ";
Platform.dbExecuteSql( sql );
Platform.dbFetchFields( "", staflg );
Argument<String> staflgBox = new Argument<String>("","");
Platform.dbFetchFields( "", staflgBox );
staflg=staflgBox.value;
error1 = Platform.errorCode();
Platform.dbCloseCursor();
Platform.sqlSetCommittedRead();
......
......@@ -32,7 +32,11 @@ void setZDRZYORN()
trnInr = Platform.mid( line, pos + 1, pos + 6 );
sfzdrzSQL2 = sfzdrzSQL1 + "'" + Platform.trim( trnInr ) + "'";
Platform.dbExecuteSql( sfzdrzSQL2 );
Platform.dbFetchFields( "", aurtrninr, "", usesta );
Argument<String> aurtrninrBox = new Argument<String>("","");
Argument<String> usestaBox = new Argument<String>("","");
Platform.dbFetchFields( "", aurtrninrBox, "", usestaBox );
aurtrninr=aurtrninrBox.value;
usesta=usestaBox.value;
error = Platform.errorCode();
Platform.dbCloseCursor();
if( ! Platform.isEmpty( aurtrninr ) && Platform.compareTo( usesta , "D" ) == 0 )
......
......@@ -21,7 +21,15 @@ event $diacon\butdia order 1000
objref = "";
objnam = "";
Platform.dbExecuteSql( "select OBJTYP, OBJINR, OWNREF, OBJNAM from TRN where INR = " + Platform.sqlLit( trn_inr ) );
Platform.dbFetchFields( "", objtyp, "", objinr, "", objref, "", objnam );
Argument<String> objtypBox = new Argument<String>("","");
Argument<String> objinrBox = new Argument<String>("","");
Argument<String> objrefBox = new Argument<String>("","");
Argument<String> objnamBox = new Argument<String>("","");
Platform.dbFetchFields( "", objtypBox, "", objinrBox, "", objrefBox, "", objnamBox );
objtyp=objtypBox.value;
objinr=objinrBox.value;
objref=objrefBox.value;
objnam=objnamBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -29,7 +29,11 @@ boolean ifSameContract(IStream argstm)
if( Platform.errorCode() == tdCacheNotFound )
{
Platform.dbExecuteSql( "select OBJTYP, OBJINR from TRN where INR = " + Platform.sqlLit( trninr ) );
Platform.dbFetchFields( "", objtyp, "", objinr );
Argument<String> objtypBox = new Argument<String>("","");
Argument<String> objinrBox = new Argument<String>("","");
Platform.dbFetchFields( "", objtypBox, "", objinrBox );
objtyp=objtypBox.value;
objinr=objinrBox.value;
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
......
......@@ -13,7 +13,11 @@ String getPreLst(String srvnam)
Platform.dbExecuteSql( "SELECT SUCSRV, PRESRV FROM SRO ORDER BY SUCSRV" );
while( Platform.errorCode() <= 0 )
{
Platform.dbFetchFields( "SUCSRV", sucsrv, "PRESRV", presrv );
Argument<String> sucsrvBox = new Argument<String>("","");
Argument<String> presrvBox = new Argument<String>("","");
Platform.dbFetchFields( "SUCSRV", sucsrvBox, "PRESRV", presrvBox );
sucsrv=sucsrvBox.value;
presrv=presrvBox.value;
if( Platform.errorCode() <= 0 )
{
if( Platform.compareTo(sucsrv, Platform.mid( lst, 1, 6 )) != 0 )
......
......@@ -14,7 +14,9 @@ String getPtyFld(String ptyfld,String ptyinr)
sql = "select " + ptyfld + " from pty where inr = " + Platform.sqlLit( ptyinr );
Platform.dbExecuteSql( sql );
err = Platform.errorCode();
Platform.dbFetchFields( "", val );
Argument<String> valBox = new Argument<String>("","");
Platform.dbFetchFields( "", valBox );
val=valBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
}
......
......@@ -7,7 +7,9 @@ String getCtyField(String argfld,String argsql)
{
Platform.dbExecuteSql( "SELECT " + argfld + " FROM CTY " + argsql );
err = Platform.errorCode();
Platform.dbFetchFields( "", val );
Argument<String> valBox = new Argument<String>("","");
Platform.dbFetchFields( "", valBox );
val=valBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
}
......
......@@ -4,7 +4,9 @@ String getBnkCod(String argact)
String bnkcod = "";
Platform.dbExecuteSQL( "SELECT BRANCH FROM BCH WHERE INR IN (SELECT BCHKEYINR FROM ACT WHERE EXTKEY=?)", argact );
int err = Platform.errorCode();
Platform.dbFetchFields( "", bnkcod );
Argument<String> bnkcodBox = new Argument<String>("","");
Platform.dbFetchFields( "", bnkcodBox );
bnkcod=bnkcodBox.value;
Platform.dbCloseCursor();
err = Platform.errorCode();
return bnkcod;
......
......@@ -21,7 +21,11 @@ void updateTdparaCurTable()
// #### label GetNext
GetNext:
while(true){
Platform.dbFetchFields( "COD", curCod, "DEC", curDec );
Argument<String> curCodBox = new Argument<String>("","");
Argument<Integer> curDecBox = new Argument<Integer>("",0);
Platform.dbFetchFields( "COD", curCodBox, "DEC", curDecBox );
curCod=curCodBox.value;
curDec=curDecBox.value;
String curNam = NULLSTR;
String curLin = NULLSTR;
if( Platform.errorCode() <= 0 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment