Commit 9e16915d by 潘际乾

S脚本文件修改goto

parent 58e63d06
#Tue Oct 12 16:26:34 CST 2021
#Mon Oct 18 18:02:27 CST 2021
LastTarget=eIBS
ScalePercent=80
DefaultTransName=ditopn
......
......@@ -6,7 +6,8 @@ void ptsmodSetPtsPtaFromChilds(#ptspta argptspta)
String dbfadrblkcn = NULLSTR;
if( Platform.isEmpty( $$argptspta\adr\inr ) )
{
Platform.clear( $$argptspta\dbfadrblk );
// Platform.clear( $$argptspta\dbfadrblk );
$$argptspta\dbfadrblk =NULLSTR;
}
else
{
......
......@@ -80,7 +80,8 @@ void ptsmodSetPtsFromPta(#ptspta argptspta)
switch( Platform.streamCount( adrstm ) )
{
case 0:
Platform.clear( $$argptspta\pts\nam );
//Platform.clear( $$argptspta\pts\nam );
$$argptspta\pts\nam = NULLSTR;
break;
case 1:
$$argptspta\pts\nam = Platform.getLine( adrstm, 1 );
......
......@@ -3,26 +3,33 @@ void recalcSetfegBog()
int rclCnt = 0;
Platform.postDefaultRule( $macbog );
String rclMacOld = $macbog;
// #######TODO 改写 LABEL与GOTO #### label RclStart
boolean firstCall = false;
Argument<Boolean> firstCallBox = new Argument<Boolean>("",firstCall);
getFepEntries( firstCallBox );
// #### label RclStart
boolean firstCall;
Argument<Boolean> firstCallBox;
RclStart:
while(true) {
firstCall = false;
firstCallBox = new Argument<Boolean>("",firstCall);
getFepEntries( firstCallBox );
firstCall = firstCallBox.value;
firstCall = firstCallBox.value;
defaultSetfel();
if( firstCall )
{
ptsAdjust();
defaultSetfel();
if( firstCall )
{
ptsAdjust();
}
Platform.postDefaultRule( $macbog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $macbog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $macbog;
rclCnt = rclCnt + 1;
// return ; // #### goto RclStart
continue RclStart;
}
$macbogold = $macbog;
return;
}
Platform.postDefaultRule( $macbog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $macbog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $macbog;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
}
$macbogold = $macbog;
}
\ No newline at end of file
......@@ -43,7 +43,8 @@ void addTrnFee(String id,String feetyp,String feeflg,int feeunt,Date from,Date t
// check, if fee is defined
if( Platform.streamSearch( $avbfeecod, feetyp ) == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
return;
}
// check, if transaction fee is already in stream
// if so, define it
......@@ -116,6 +117,6 @@ void addTrnFee(String id,String feetyp,String feeflg,int feeunt,Date from,Date t
mac = Platform.macGen( feetyp + feeflg + Platform.toString( feeunt ) + Platform.fmtDateShort( from ) + Platform.fmtDateShort( till ) + Platform.toString( rate ) + Platform.toString( basamt ) + cdtoldflg + addinf, 0 );
Platform.cacheWrite( mac, "SETFEG", "MAC", idx );
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
}
\ No newline at end of file
......@@ -4,92 +4,104 @@ void recalcSetfegEog()
int rclCnt = 0;
Platform.postDefaultRule( $maceog );
String rclMacOld = $maceog;
// #######TODO 改写 LABEL与GOTO #### label RclStart
// #### label RclStart
// move amounts to settlement
$\setmod\setglg.setglgClrAmount ( "*SETFEG" );
int gridcnt = 0;
String act = NULLSTR;
int err = 0;
String dflg = NULLSTR;
int error = 0;
String cdtKey = NULLSTR;
String amtkey = NULLSTR;
if( Platform.isVisible( $\setmod\setpan ) )
{
gridcnt = Platform.gridCount( $setfel );
for(int i = 1;i <= gridcnt;i++)
{
if( ! Platform.isEmpty( $setfel[i]\rol ) && ! Platform.isEmpty( $setfel[i]\amt ) )
int gridcnt;
String act;
int err;
String dflg;
int error;
String cdtKey;
String amtkey;
RclStart:
while(true){
$\setmod\setglg.setglgClrAmount ( "*SETFEG" );
gridcnt = 0;
act = NULLSTR;
err = 0;
dflg = NULLSTR;
error = 0;
cdtKey = NULLSTR;
amtkey = NULLSTR;
if( Platform.isVisible( $\setmod\setpan ) )
{
if( Platform.compareTo($setfel[i]\dsp, "X" )== 0 || Platform.compareTo($setfel[i]\dsp, "S" )== 0 )
gridcnt = Platform.gridCount( $setfel );
for(int i = 1;i <= gridcnt;i++)
{
if( Platform.compareTo( $setfel[i]\rol , "OWN" ) == 0 )
if( ! Platform.isEmpty( $setfel[i]\rol ) && ! Platform.isEmpty( $setfel[i]\amt ) )
{
// HDQ 扣收国外费用跟国外付汇的账务分录合并
if( Platform.pos( Platform.getTransName(), "CPT" ) == 0 )
if( Platform.compareTo($setfel[i]\dsp, "X" )== 0 || Platform.compareTo($setfel[i]\dsp, "S" )== 0 )
{
// 内扣费用不再走SP
// $act = \SETMOD\GLEMOD.GetAvailAcc ( "SP-OTH", SETFEL( $i )\CUR, "", self, -SETFEL( $i )\AMT )
act = $\setmod\glemod.getAvailAcc ( "CA-OTH", $setfel[i]\cur.getValue(), "", this, $setfel[i]\amt.getValue().negate() );
}
else
{
if( Platform.compareTo( Platform.getTransName() , "CPTRET" ) == 0 || Platform.compareTo( Platform.getTransName() , "CPTOPN" ) == 0 )
{
act = $\setmod\glemod.getAvailAcc ( "CA-OTH", $setfel[i]\cur.getValue(), "", this, $setfel[i]\amt.getValue().negate() );
}
else
{
act = $\setmod\glemod.getAvailAcc ( "SP-OTH", $setfel[i]\cur.getValue(), "", this, $setfel[i]\amt.getValue().negate() );
}
}
if( Platform.compareTo( $\sysmod\bch\branch , "6701" ) == 0 )
{
//6701网点的待划转直接取codetable中的值
//$act = GetTblText( SETFEL( $i )\CUR, "FTACT1", GetUIL )
act = Platform.getCodetableLabelOfTd( $setfel[i]\cur.getValue(), "FTACA", Platform.getLang() );
err = Platform.errorCode();
}
switch( Platform.getTransName() )
{
case "TRTSET":
dflg = Platform.getContent( "\\LIDGRP\\REC\\DFLG" );
error = Platform.errorCode();
//国内证费用承担为OWN角色为RPC
if( Platform.compareTo( dflg , "D" ) == 0 )
if( Platform.compareTo( $setfel[i]\rol , "OWN" ) == 0 )
{
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "RPC", "", act, "" );
// HDQ 扣收国外费用跟国外付汇的账务分录合并
if( Platform.pos( Platform.getTransName(), "CPT" ) == 0 )
{
// 内扣费用不再走SP
// $act = \SETMOD\GLEMOD.GetAvailAcc ( "SP-OTH", SETFEL( $i )\CUR, "", self, -SETFEL( $i )\AMT )
act = $\setmod\glemod.getAvailAcc ( "CA-OTH", $setfel[i]\cur.getValue(), "", this, $setfel[i]\amt.getValue().negate() );
}
else
{
if( Platform.compareTo( Platform.getTransName() , "CPTRET" ) == 0 || Platform.compareTo( Platform.getTransName() , "CPTOPN" ) == 0 )
{
act = $\setmod\glemod.getAvailAcc ( "CA-OTH", $setfel[i]\cur.getValue(), "", this, $setfel[i]\amt.getValue().negate() );
}
else
{
act = $\setmod\glemod.getAvailAcc ( "SP-OTH", $setfel[i]\cur.getValue(), "", this, $setfel[i]\amt.getValue().negate() );
}
}
if( Platform.compareTo( $\sysmod\bch\branch , "6701" ) == 0 )
{
//6701网点的待划转直接取codetable中的值
//$act = GetTblText( SETFEL( $i )\CUR, "FTACT1", GetUIL )
act = Platform.getCodetableLabelOfTd( $setfel[i]\cur.getValue(), "FTACA", Platform.getLang() );
err = Platform.errorCode();
}
switch( Platform.getTransName() )
{
case "TRTSET":
dflg = Platform.getContent( "\\LIDGRP\\REC\\DFLG" );
error = Platform.errorCode();
//国内证费用承担为OWN角色为RPC
if( Platform.compareTo( dflg , "D" ) == 0 )
{
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "RPC", "", act, "" );
}
else
{
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "SPC", "", act, "" );
}
break;
case "CPTRET":
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "CAC", "C", act, "" );
break;
default:
// 内扣费用不再走SP
//$CdtKey = \SETMOD\SETGLG.SetglgAddAmount ( "*SETFEG", "OWN", SETFEL( $i )\CUR, SETFEL( $i )\AMT, "", "SPC", "C", $act, "" )
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "CAC", "C", act, "" );
}
}
else
{
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "SPC", "", act, "" );
amtkey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", $setfel[i]\rol.getValue(), $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "FEG", "", "", "", "" );
}
break;
case "CPTRET":
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "CAC", "C", act, "" );
break;
default:
// 内扣费用不再走SP
//$CdtKey = \SETMOD\SETGLG.SetglgAddAmount ( "*SETFEG", "OWN", SETFEL( $i )\CUR, SETFEL( $i )\AMT, "", "SPC", "C", $act, "" )
cdtKey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", "OWN", $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "", "CAC", "C", act, "" );
}
}
else
{
amtkey = $\setmod\setglg.setglgAddAmount ( "*SETFEG", $setfel[i]\rol.getValue(), $setfel[i]\cur.getValue(), $setfel[i]\amt.getValue(), "FEG", "", "", "", "" );
}
}
}
}
}
Platform.postDefaultRule( $maceog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $maceog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $maceog;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
Platform.postDefaultRule( $maceog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $maceog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $maceog;
rclCnt = rclCnt + 1;
//return ; // #### goto RclStart
continue RclStart;
}
$maceogold = $maceog;
return;
}
$maceogold = $maceog;
}
\ No newline at end of file
......@@ -43,7 +43,8 @@ void addTrnFee1(String id,String feetyp,String feeflg,int feeunt,Date from,Date
// check, if fee is defined
if( Platform.streamSearch( $avbfeecod, feetyp ) == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto done
// return ; // #### goto done
return;
}
// check, if transaction fee is already in stream
// if so, define it
......@@ -116,6 +117,6 @@ void addTrnFee1(String id,String feetyp,String feeflg,int feeunt,Date from,Date
mac = Platform.macGen( feetyp + feeflg + Platform.toString( feeunt ) + Platform.fmtDateShort( from ) + Platform.fmtDateShort( till ) + Platform.toString( rate ) + Platform.toString( basamt ) + cdtoldflg + addinf, 0 );
Platform.cacheWrite( mac, "SETFEG", "MAC", idx );
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
}
\ No newline at end of file
......@@ -4,92 +4,97 @@ void recalcSetfogEog()
int rclCnt = 0;
Platform.postDefaultRule( $maceog );
String rclMacOld = $maceog;
// #######TODO 改写 LABEL与GOTO #### label RclStart
$\setmod\setglg.setglgClrAmount ( "*SETFOG" );
int gridcnt = Platform.gridCount( $setfol );
String act = NULLSTR;
String amtkeyCdt = NULLSTR;
int err = 0;
String amtkeyDbt = NULLSTR;
if( Platform.isVisible( $\setmod\setpan ) )
{
for(int i = 1;i <= gridcnt;i++)
{
if( ! Platform.isEmpty( $setfol[i]\ptypay ) && ! Platform.isEmpty( $setfol[i]\ptydbt ) && ! Platform.isEmpty( $setfol[i]\amt ) )
// #### label RclStart
RclStart:
while(true){
$\setmod\setglg.setglgClrAmount ( "*SETFOG" );
int gridcnt = Platform.gridCount( $setfol );
String act = NULLSTR;
String amtkeyCdt = NULLSTR;
int err = 0;
String amtkeyDbt = NULLSTR;
if( Platform.isVisible( $\setmod\setpan ) )
{
if( Platform.compareTo($setfol[i]\dsp, "X" )== 0 || Platform.compareTo($setfol[i]\dsp, "S" )== 0 )
for(int i = 1;i <= gridcnt;i++)
{
//cgl 出口收汇国外扣费费用合并xxf
if( Platform.compareTo( Platform.getTransName() , "BETSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "BTTSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "BOTSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "CPTADV" ) == 0 || Platform.compareTo( Platform.getTransName() , "GETSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "TRTSET" ) == 0 )
if( ! Platform.isEmpty( $setfol[i]\ptypay ) && ! Platform.isEmpty( $setfol[i]\ptydbt ) && ! Platform.isEmpty( $setfol[i]\amt ) )
{
if( Platform.compareTo( Platform.getTransName() , "CPTADV" ) == 0 )
if( Platform.compareTo($setfol[i]\dsp, "X" )== 0 || Platform.compareTo($setfol[i]\dsp, "S" )== 0 )
{
act = $\setmod\glemod.getAvailAcc ( "SP-OTH", $setfol[i]\cur.getValue(), "", this, $setfol[i]\amt.getValue().negate() );
}
else
{
// 修改trtset交易收取利息的情况下CAC无法取对金额的问题
if( Platform.compareTo( Platform.getTransName() , "TRTSET" ) == 0 )
{
act = $\setmod\glemod.getAvailAcc ( "CA-OTH", $setfol[i]\cur.getValue(), "", this, $setfol[i]\amt.getValue().negate() );
}
else
{
act = $\setmod\glemod.getAvailAcc ( "SP-OTH", $setfol[i]\cur.getValue(), "", this, $setfol[i]\amt.getValue().negate() );
}
}
if( Platform.compareTo( Platform.getTransName() , "TRTSET" ) == 0 )
{
if( Platform.compareTo( Platform.getContent( "\\LIDGRP\\REC\\DFLG" ) , "D" ) == 0 )
//cgl 出口收汇国外扣费费用合并xxf
if( Platform.compareTo( Platform.getTransName() , "BETSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "BTTSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "BOTSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "CPTADV" ) == 0 || Platform.compareTo( Platform.getTransName() , "GETSET" ) == 0 || Platform.compareTo( Platform.getTransName() , "TRTSET" ) == 0 )
{
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "RPC", "", "", "" );
if( Platform.compareTo( Platform.getTransName() , "CPTADV" ) == 0 )
{
act = $\setmod\glemod.getAvailAcc ( "SP-OTH", $setfol[i]\cur.getValue(), "", this, $setfol[i]\amt.getValue().negate() );
}
else
{
// 修改trtset交易收取利息的情况下CAC无法取对金额的问题
if( Platform.compareTo( Platform.getTransName() , "TRTSET" ) == 0 )
{
act = $\setmod\glemod.getAvailAcc ( "CA-OTH", $setfol[i]\cur.getValue(), "", this, $setfol[i]\amt.getValue().negate() );
}
else
{
act = $\setmod\glemod.getAvailAcc ( "SP-OTH", $setfol[i]\cur.getValue(), "", this, $setfol[i]\amt.getValue().negate() );
}
}
if( Platform.compareTo( Platform.getTransName() , "TRTSET" ) == 0 )
{
if( Platform.compareTo( Platform.getContent( "\\LIDGRP\\REC\\DFLG" ) , "D" ) == 0 )
{
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "RPC", "", "", "" );
}
else
{
if( Platform.compareTo( $\sysmod\bch\branch , "6701" ) == 0 )
{
//6701网点的待划转直接取codetable中的值
act = Platform.getCodetableLabelOfTd( $setfol[i]\cur.getValue(), "FTACT1", Platform.getLang() );
act = Platform.getCodetableLabelOfTd( $setfol[i]\cur.getValue(), "FTACA", Platform.getLang() );
err = Platform.errorCode();
}
/** // 修改trtset交易收取利息的情况下CAC无法取对金额的问题
$amtkeyCdt = \SETMOD\SETGLG.SetglgAddAmount ( "*SETFOG", SETFOL( $i )\PTYPAY, SETFOL( $i )\CUR, -SETFOL( $i )\AMT, "FOG", "SPC", "", $act, "" )
**/
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "CAC", "", act, "" );
}
}
else
{
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "SPD", "C", act, "" );
}
}
else
{
if( Platform.compareTo( $\sysmod\bch\branch , "6701" ) == 0 )
{
//6701网点的待划转直接取codetable中的值
act = Platform.getCodetableLabelOfTd( $setfol[i]\cur.getValue(), "FTACT1", Platform.getLang() );
act = Platform.getCodetableLabelOfTd( $setfol[i]\cur.getValue(), "FTACA", Platform.getLang() );
err = Platform.errorCode();
}
/** // 修改trtset交易收取利息的情况下CAC无法取对金额的问题
$amtkeyCdt = \SETMOD\SETGLG.SetglgAddAmount ( "*SETFOG", SETFOL( $i )\PTYPAY, SETFOL( $i )\CUR, -SETFOL( $i )\AMT, "FOG", "SPC", "", $act, "" )
**/
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "CAC", "", act, "" );
//
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "", "", "", "" );
}
amtkeyDbt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptydbt.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue(), "FOG", "", "", "", "" );
}
else
{
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "SPD", "C", act, "" );
}
}
else
{
//
amtkeyCdt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptypay.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue().negate(), "FOG", "", "", "", "" );
}
amtkeyDbt = $\setmod\setglg.setglgAddAmount ( "*SETFOG", $setfol[i]\ptydbt.getValue(), $setfol[i]\cur.getValue(), $setfol[i]\amt.getValue(), "FOG", "", "", "", "" );
}
}
}
}
$netamt = $docamt;
if( gridcnt > 0 )
{
for(int i = 1;i <= gridcnt;i++)
{
$netamt = Platform.numAdd($netamt.getValue() , Platform.numMul($setfol[i]\amt.getValue() , $forsgn.getValue()));
}
}
Platform.postDefaultRule( $maceog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $maceog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $maceog;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
$netamt = $docamt;
if( gridcnt > 0 )
{
for(int i = 1;i <= gridcnt;i++)
{
$netamt = Platform.numAdd($netamt.getValue() , Platform.numMul($setfol[i]\amt.getValue() , $forsgn.getValue()));
}
}
Platform.postDefaultRule( $maceog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $maceog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $maceog;
rclCnt = rclCnt + 1;
//return ; // #### goto RclStart
continue RclStart;
}
$maceogold = $maceog;
break;
}
$maceogold = $maceog;
}
\ No newline at end of file
......@@ -5,18 +5,23 @@ void recalcSetfol(String argrow)
int rclCnt = 0;
Platform.postDefaultRule( $mac );
String rclMacOld = $mac;
// #######TODO 改写 LABEL与GOTO #### label RclStart
// #### label RclStart
// Default fields standard
recalcSetfolStdDft( argrow );
// Do installation specific defaulting
recalcSetfolIsfDft( argrow );
Platform.postDefaultRule( $mac );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $mac.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $mac;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
RclStart:
while(true){
recalcSetfolStdDft( argrow );
// Do installation specific defaulting
recalcSetfolIsfDft( argrow );
Platform.postDefaultRule( $mac );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $mac.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $mac;
rclCnt = rclCnt + 1;
//return ; // #### goto RclStart
continue RclStart;
}
break;
}
$macold = $mac;
setCusPanelDescription();
......
......@@ -3,39 +3,44 @@ void recalcSetglgBog()
int rclCnt = 0;
Platform.postDefaultRule( $mac );
String rclMacOld = $mac;
// #######TODO 改写 LABEL与GOTO #### label RclStart
// Collect amounts
internalWrkSumCollect();
// load temporary info (if picked up)
if( ! Platform.isEmpty( $\setmod\sep\inr ) )
{
internalGetGlp();
}
// distribue to booking grid
internalGlgDistrib();
$totamt = new BigDecimal("0");
int gridcnt = Platform.gridCount( $setgll );
for(int i = 1;i <= gridcnt;i++)
{
$totamt = Platform.numAdd($totamt.getValue() , Platform.abs( $setgll[i]\amt.getValue() ));
}
// set label showing temporary settlement
if( Platform.compareTo( $dspflg.getValue() , "C" ) == 0 )
{
Platform.visible( $labdspflg );
$labdspflg = Platform.getCodetableLabelOfTd( $dspflg.getValue(), "SETMOD:DSPFLG", Platform.getLang() );
}
else
{
Platform.invisible( $labdspflg );
}
Platform.postDefaultRule( $mac );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $mac.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $mac;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
// #### label RclStart
RclStart:
while(true){
// Collect amounts
internalWrkSumCollect();
// load temporary info (if picked up)
if( ! Platform.isEmpty( $\setmod\sep\inr ) )
{
internalGetGlp();
}
// distribue to booking grid
internalGlgDistrib();
$totamt = new BigDecimal("0");
int gridcnt = Platform.gridCount( $setgll );
for(int i = 1;i <= gridcnt;i++)
{
$totamt = Platform.numAdd($totamt.getValue() , Platform.abs( $setgll[i]\amt.getValue() ));
}
// set label showing temporary settlement
if( Platform.compareTo( $dspflg.getValue() , "C" ) == 0 )
{
Platform.visible( $labdspflg );
$labdspflg = Platform.getCodetableLabelOfTd( $dspflg.getValue(), "SETMOD:DSPFLG", Platform.getLang() );
}
else
{
Platform.invisible( $labdspflg );
}
Platform.postDefaultRule( $mac );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $mac.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $mac;
rclCnt = rclCnt + 1;
//return ; // #### goto RclStart
continue RclStart;
}
break;
}
$macold = $mac;
......
......@@ -60,73 +60,73 @@ void internalGllAdjust(BigDecimal argamt,String argcur,String srcmod,int srcidx)
BigDecimal b = argamt;
int free = -1;
int gridcnt = Platform.gridCount( $setgll );
// #######TODO 改写 LABEL与GOTO #### label lopfee
// #### label lopfee
lopfee:
while(true){
f = f + 1;
if( f > gridcnt ) {
//return ; // #######TODO #### goto lopend
//return ; // #### goto lopend
break lopfee;
}
if( Platform.isEmpty( $setgll[f]\rol ) ) {
if( free < 0 ) {
free = f;
}
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(r, $setgll[f]\rol.getValue()) != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(argcur, $setgll[f]\cur.getValue()) != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(d, $setgll[f]\flg.getValue()) != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(gllGrp, $setgll[f]\gllgrp.getValue()) != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(fcdinr, $setgll[f]\fcdinr.getValue()) != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(act, $setgll[f]\act.getValue()) != 0 && Platform.compareTo( dspflg , "A" ) == 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo( dspflg , "A" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "A") != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(dspflg, "A") != 0 && Platform.compareTo( $setgll[f]\dspflg , "A" ) == 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo( dspflg , "C" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "C") != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(dspflg, "C") != 0 && Platform.compareTo( $setgll[f]\dspflg , "C" ) == 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo( dspflg , "F" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "F") != 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo(dspflg, "F") != 0 && Platform.compareTo( $setgll[f]\dspflg , "F" ) == 0 ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
// don`t mix debits and credits (if not allowed by SetDebCreAlw)
if( Platform.Sgn( $setgll[f]\amt.getValue() ) * Platform.Sgn( argamt ) < 0 && Platform.isEmpty( $\setmod\debcrealwflg ) ) {
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
if( Platform.compareTo( $setgll[f]\modflg , "-" ) == 0 ) {
......@@ -144,14 +144,14 @@ void internalGllAdjust(BigDecimal argamt,String argcur,String srcmod,int srcidx)
$setgll[f]\donflg = "x";
internalSetValdat( f, valdat );
}
//return ; // #######TODO #### goto lopfee
//return ; // #### goto lopfee
continue lopfee;
}
// #######TODO 改写 LABEL与GOTO #### label lopend
// #### label lopend
if( Platform.compareTo( b , 0 ) == 0 && ( Platform.isEmpty( amtIDsStm ) || Platform.isEmpty( $creemplinflg ) ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto subend
return ; // #### goto subend
}
if( n < 0 )
{
......@@ -331,6 +331,6 @@ void internalGllAdjust(BigDecimal argamt,String argcur,String srcmod,int srcidx)
}
}
Platform.resetModified( $setgll[f]\amt.getValue() );
// #######TODO 改写 LABEL与GOTO #### label subend
// #### label subend
}
\ No newline at end of file
......@@ -22,12 +22,12 @@ void internalGlgDistrib()
int i = 1;
String trnset = "";
// #### label lop1
lop1:
while(true){
// #######TODO 改写 LABEL与GOTO #### label lop1
if( i > gridcnt )
{
//return ; // #######TODO 改写 LABEL与GOTO #### goto don1
//return ; // #### goto don1
break lop1;
}
$setgll[i]\donflg = " ";
......@@ -46,10 +46,10 @@ void internalGlgDistrib()
$setgll[i]\setxxxrow = setSumMax;
}
i = i + 1;
//return ; // #######TODO 改写 LABEL与GOTO #### goto lop1
//return ; // #### goto lop1
continue lop1;
}
// #######TODO 改写 LABEL与GOTO #### label don1
// #### label don1
// Check all lines of Workgrid and add, if necessary
for(int f = 1;f <= gridcnt;f++)
{
......@@ -61,27 +61,27 @@ void internalGlgDistrib()
lopwrk:
while(true){
// #######TODO 改写 LABEL与GOTO #### label lopwrk
// #### label lopwrk
w = w + 1;
if( w > Platform.streamCount( $wrksumcon.getValue() ) )
{
//return ; // #######TODO 改写 LABEL与GOTO #### goto donwrk
//return ; // #### goto donwrk
break lopwrk;
}
internalWrksumGetByIdx( w );
internalGllAdjust( $wrksum\amt.getValue(), $wrksum\cur.getValue(), "WRKSUM", w );
// return ; // #######TODO 改写 LABEL与GOTO #### goto lopwrk
// return ; // #### goto lopwrk
continue lopwrk;
}
// #######TODO 改写 LABEL与GOTO #### label donwrk
// #### label donwrk
int f = 1;
lopfee2:
while(true){
// #######TODO 改写 LABEL与GOTO #### label lopfee2
// #### label lopfee2
if( f > gridcnt )
{
//return ; // #######TODO 改写 LABEL与GOTO #### goto donfee2
//return ; // #### goto donfee2
break lopfee2;
}
if( Platform.compareTo( $setgll[f]\donflg , " " ) == 0 )
......@@ -98,11 +98,11 @@ void internalGlgDistrib()
}
}
f = f + 1;
//return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee2
//return ; // #### goto lopfee2
continue lopfee2;
}
// #######TODO 改写 LABEL与GOTO #### label donfee2
// #### label donfee2
for( f = 1;f <= gridcnt;f++)
{
if( Platform.compareTo($setgll[f]\accamtfix.getValue(), "T") != 0 )
......
......@@ -3,92 +3,97 @@ void recalcSetglgEog()
int rclCnt = 0;
Platform.postDefaultRule( $maceog );
String rclMacOld = $maceog;
// #######TODO 改写 LABEL与GOTO #### label RclStart
// #### label RclStart
// redistibute ACCCPRAMT
// Control stream holding line for acccpramt for CPRMACs
// Format : MAC+TAB+ Str(line)
IStream ctlStm = new StreamImpl();
Platform.streamClear( ctlStm );
int gridcnt = Platform.gridCount( $setgll );
int ctlIdx = 0;
String ctllin = NULLSTR;
int oldlin = 0;
for(int i = 1;i <= gridcnt;i++)
{
if( Platform.isEmpty( $setgll[i]\accamt ) )
{
Platform.clear( $setgll[i]\acccpramt );
}
else
{
ctlIdx = Platform.streamSearch( ctlStm, $setgll[i]\cprmac.getValue() + "\t" );
if( ctlIdx == 0 )
RclStart:
while(true){
IStream ctlStm = new StreamImpl();
Platform.streamClear( ctlStm );
int gridcnt = Platform.gridCount( $setgll );
int ctlIdx = 0;
String ctllin = NULLSTR;
int oldlin = 0;
for(int i = 1;i <= gridcnt;i++)
{
$setgll[i]\acccpramt = $setgll[i]\accamt;
Platform.streamInsert( ctlStm, 0, $setgll[i]\cprmac.getValue() + "\t" + Platform.toString( i ) );
Platform.streamClear( $setgll[i]\cprlinlst.getValue() );
Platform.streamInsert( $setgll[i]\cprlinlst.getValue(), 0, Platform.toString( i ) );
}
else
{
ctllin = Platform.getLine( ctlStm, ctlIdx );
oldlin = Platform.parseInt( Platform.mid( ctllin, Platform.pos( ctllin, "\t" ) + 1 ) );
Platform.clear( $setgll[i]\acccpramt );
// the old line gets amount of this line, if same direction or amount in old line is greater or equal amount of this line
if( Platform.Sgn( $setgll[oldlin]\acccpramt.getValue() ) == Platform.Sgn( $setgll[i]\accamt.getValue() ) || Platform.abs( $setgll[oldlin]\acccpramt.getValue() ).compareTo(Platform.abs( $setgll[i]\accamt.getValue() )) >= 0 )
if( Platform.isEmpty( $setgll[i]\accamt ) )
{
$setgll[oldlin]\acccpramt = Platform.numAdd($setgll[oldlin]\acccpramt.getValue() , $setgll[i]\accamt.getValue());
Platform.streamClear( $setgll[i]\cprlinlst.getValue() );
Platform.streamInsert( $setgll[oldlin]\cprlinlst.getValue(), 0, Platform.toString( i ) );
Platform.clear( $setgll[i]\acccpramt );
}
else
{
// otherwise this line is the new line for the compressed amount
$setgll[i]\acccpramt = Platform.numAdd($setgll[oldlin]\acccpramt.getValue() , $setgll[i]\accamt.getValue());
Platform.streamSetLine( ctlStm, ctlIdx, $setgll[i]\cprmac.getValue() + "\t" + Platform.toString( i ) );
Platform.streamSet( $setgll[i]\cprlinlst.getValue(), $setgll[oldlin]\cprlinlst.getValue() );
Platform.streamInsert( $setgll[i]\cprlinlst.getValue(), 0, Platform.toString( i ) );
$setgll[oldlin]\acccpramt = new BigDecimal("0");
Platform.streamClear( $setgll[oldlin]\cprlinlst.getValue() );
ctlIdx = Platform.streamSearch( ctlStm, $setgll[i]\cprmac.getValue() + "\t" );
if( ctlIdx == 0 )
{
$setgll[i]\acccpramt = $setgll[i]\accamt;
Platform.streamInsert( ctlStm, 0, $setgll[i]\cprmac.getValue() + "\t" + Platform.toString( i ) );
Platform.streamClear( $setgll[i]\cprlinlst.getValue() );
Platform.streamInsert( $setgll[i]\cprlinlst.getValue(), 0, Platform.toString( i ) );
}
else
{
ctllin = Platform.getLine( ctlStm, ctlIdx );
oldlin = Platform.parseInt( Platform.mid( ctllin, Platform.pos( ctllin, "\t" ) + 1 ) );
Platform.clear( $setgll[i]\acccpramt );
// the old line gets amount of this line, if same direction or amount in old line is greater or equal amount of this line
if( Platform.Sgn( $setgll[oldlin]\acccpramt.getValue() ) == Platform.Sgn( $setgll[i]\accamt.getValue() ) || Platform.abs( $setgll[oldlin]\acccpramt.getValue() ).compareTo(Platform.abs( $setgll[i]\accamt.getValue() )) >= 0 )
{
$setgll[oldlin]\acccpramt = Platform.numAdd($setgll[oldlin]\acccpramt.getValue() , $setgll[i]\accamt.getValue());
Platform.streamClear( $setgll[i]\cprlinlst.getValue() );
Platform.streamInsert( $setgll[oldlin]\cprlinlst.getValue(), 0, Platform.toString( i ) );
}
else
{
// otherwise this line is the new line for the compressed amount
$setgll[i]\acccpramt = Platform.numAdd($setgll[oldlin]\acccpramt.getValue() , $setgll[i]\accamt.getValue());
Platform.streamSetLine( ctlStm, ctlIdx, $setgll[i]\cprmac.getValue() + "\t" + Platform.toString( i ) );
Platform.streamSet( $setgll[i]\cprlinlst.getValue(), $setgll[oldlin]\cprlinlst.getValue() );
Platform.streamInsert( $setgll[i]\cprlinlst.getValue(), 0, Platform.toString( i ) );
$setgll[oldlin]\acccpramt = new BigDecimal("0");
Platform.streamClear( $setgll[oldlin]\cprlinlst.getValue() );
}
}
}
}
}
}
for(int i = 1;i <= gridcnt;i++)
{
$setgll[i]\fmtacccpramt = Platform.abs( $setgll[i]\acccpramt.getValue() );
switch( Platform.streamCount( $setgll[i]\cprlinlst.getValue() ) )
{
case 1:
Platform.setTDStyle( "", $setgll[i]\fmtaccamt );
Platform.setHint( $setgll[i]\fmtaccamt.getValue(), "" );
Platform.invisible( $setgll[i]\cprbut );
Platform.invisible( $setgll[i]\cprp );
break;
case 0:
Platform.setTDStyle( "green", $setgll[i]\fmtaccamt );
Platform.setHint( $setgll[i]\fmtaccamt.getValue(), #CT000006 );
Platform.visible( $setgll[i]\cprbut );
Platform.invisible( $setgll[i]\cprp );
for(int i = 1;i <= gridcnt;i++)
{
$setgll[i]\fmtacccpramt = Platform.abs( $setgll[i]\acccpramt.getValue() );
switch( Platform.streamCount( $setgll[i]\cprlinlst.getValue() ) )
{
case 1:
Platform.setTDStyle( "", $setgll[i]\fmtaccamt );
Platform.setHint( $setgll[i]\fmtaccamt.getValue(), "" );
Platform.invisible( $setgll[i]\cprbut );
Platform.invisible( $setgll[i]\cprp );
break;
case 0:
Platform.setTDStyle( "green", $setgll[i]\fmtaccamt );
Platform.setHint( $setgll[i]\fmtaccamt.getValue(), #CT000006 );
Platform.visible( $setgll[i]\cprbut );
Platform.invisible( $setgll[i]\cprp );
break;
default:
Platform.setTDStyle( "blue", $setgll[i]\fmtaccamt );
Platform.setHint( $setgll[i]\fmtaccamt.getValue(), #CT000005, $setgll[i]\acccur.getValue(), Platform.fmtAmount( Platform.abs( $setgll[i]\acccpramt.getValue() ), $setgll[i]\acccur.getValue() ), getCprAdd( i ) );
Platform.invisible( $setgll[i]\cprbut );
Platform.visible( $setgll[i]\cprp );
}
}
if( ! Platform.isEmpty( $\setmod\sep\inr ) )
{
internalGlpCheck();
}
Platform.postDefaultRule( $maceog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $maceog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $maceog;
rclCnt = rclCnt + 1;
//return ; // #### goto RclStart
continue RclStart;
}
break;
default:
Platform.setTDStyle( "blue", $setgll[i]\fmtaccamt );
Platform.setHint( $setgll[i]\fmtaccamt.getValue(), #CT000005, $setgll[i]\acccur.getValue(), Platform.fmtAmount( Platform.abs( $setgll[i]\acccpramt.getValue() ), $setgll[i]\acccur.getValue() ), getCprAdd( i ) );
Platform.invisible( $setgll[i]\cprbut );
Platform.visible( $setgll[i]\cprp );
}
}
if( ! Platform.isEmpty( $\setmod\sep\inr ) )
{
internalGlpCheck();
}
Platform.postDefaultRule( $maceog );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $maceog.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $maceog;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
}
$maceogold = $maceog;
......
......@@ -103,7 +103,7 @@ boolean checkXrtChg()
return true;
}
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
return false;
}
\ No newline at end of file
......@@ -4,30 +4,35 @@ void recalcSetgll(String argrow)
int rclCnt = 0;
Platform.postDefaultRule( $mac );
String rclMacOld = $mac;
// #######TODO 改写 LABEL与GOTO #### label RclStart
// #### label RclStart
// Reset depending fields on changes
internalResetDependingFields();
// Default fields standard
recalcSetgllStdDft( argrow );
// Do installation specific defaulting
recalcSetgllIsfDft();
$cprmac = getCprMac();
// from default ROLACTID (as PAOFLG is defaulted in RecalcSetgllIsfDft)
if( Platform.isEmpty( $paoflg ) )
{
$\sysmod.disableAndClearField( Platform.getDatafield(this,"rolactid") );
}
else
{
Platform.enable( $rolactid );
}
Platform.postDefaultRule( $mac );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $mac.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $mac;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
RclStart:
while(true){
internalResetDependingFields();
// Default fields standard
recalcSetgllStdDft( argrow );
// Do installation specific defaulting
recalcSetgllIsfDft();
$cprmac = getCprMac();
// from default ROLACTID (as PAOFLG is defaulted in RecalcSetgllIsfDft)
if( Platform.isEmpty( $paoflg ) )
{
$\sysmod.disableAndClearField( Platform.getDatafield(this,"rolactid") );
}
else
{
Platform.enable( $rolactid );
}
Platform.postDefaultRule( $mac );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $mac.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $mac;
rclCnt = rclCnt + 1;
//return ; // #### goto RclStart
continue RclStart;
}
break;
}
setCusPanelDescription();
$macold = $mac;
......
......@@ -8,7 +8,7 @@ void cnv2RatCeb(String scbcur,String dcbcur,int scbrat,int dcbrat,Argument<Strin
{
dpy.value = "???/???";
rate.value = 0;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
if( ( Platform.compareTo( dcbcur , #CT000169 ) == 0 || Platform.compareTo( scbcur , #CT000170 ) == 0 ) )
{
......@@ -16,13 +16,13 @@ void cnv2RatCeb(String scbcur,String dcbcur,int scbrat,int dcbrat,Argument<Strin
{
rate.value = dcbrat / scbrat;
dpy.value = dcbcur + "/" + scbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
else
{
rate.value = scbrat / dcbrat;
dpy.value = scbcur + "/" + dcbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
}
else
......@@ -33,13 +33,13 @@ void cnv2RatCeb(String scbcur,String dcbcur,int scbrat,int dcbrat,Argument<Strin
{
rate.value = dcbrat / scbrat;
dpy.value = dcbcur + "/" + scbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
else
{
rate.value = scbrat / dcbrat;
dpy.value = scbcur + "/" + dcbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
}
else
......@@ -50,13 +50,13 @@ void cnv2RatCeb(String scbcur,String dcbcur,int scbrat,int dcbrat,Argument<Strin
{
rate.value = dcbrat / scbrat;
dpy.value = dcbcur + "/" + scbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
else
{
rate.value = scbrat / dcbrat;
dpy.value = scbcur + "/" + dcbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
}
else
......@@ -67,24 +67,24 @@ void cnv2RatCeb(String scbcur,String dcbcur,int scbrat,int dcbrat,Argument<Strin
{
rate.value = scbrat / dcbrat;
dpy.value = scbcur + "/" + dcbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
else
{
rate.value = dcbrat / scbrat;
dpy.value = dcbcur + "/" + scbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
}
else
{
rate.value = scbrat / dcbrat;
dpy.value = scbcur + "/" + dcbcur;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
}
}
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
}
\ No newline at end of file
......@@ -29,7 +29,7 @@ String printSwiftFees(String rol,String tag,String argdirflg,String argdspflg,in
boolean allMisc = false;
// DO5CS.703597
String altCT = getAlternateFeeCodetable( tag, $\trnmod\trndoc\doccur\mt.getValue() );
// #######TODO 改写 LABEL与GOTO #### label Restart
// #### label Restart
int entCnt = 0;
IStream res = new StreamImpl();
Platform.streamClear( res );
......@@ -167,7 +167,7 @@ String printSwiftFees(String rol,String tag,String argdirflg,String argdspflg,in
if( ! allMisc )
{
allMisc = true;
//return ""; // #######TODO 改写 LABEL与GOTO #### goto Restart
//return ""; // #### goto Restart
continue Restart;
}
else
......
......@@ -27,7 +27,7 @@ String printSwiftFolFees(String rol,String tag,String argdirflg,String argdspflg
}
boolean allMisc = false;
String wrnBlkNegAmt = "";
// #######TODO 改写 LABEL与GOTO #### label Restart
// #### label Restart
Restart:
while (true){
......@@ -76,7 +76,7 @@ String printSwiftFolFees(String rol,String tag,String argdirflg,String argdspflg
if( ! allMisc )
{
allMisc = true;
//return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
//return ; // #### goto Restart
continue Restart;
}
else
......
......@@ -26,7 +26,7 @@ String printSwiftFelFees(String rol,String tag,String argdirflg,String argdspflg
chkdspflg = "S";
}
boolean allMisc = false;
// #######TODO 改写 LABEL与GOTO #### label Restart
// #### label Restart
int entCnt = 0;
IStream res = new StreamImpl();
Platform.streamClear( res );
......@@ -79,7 +79,7 @@ String printSwiftFelFees(String rol,String tag,String argdirflg,String argdspflg
if( ! allMisc )
{
allMisc = true;
//return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
//return ; // #### goto Restart
continue Restart;
}
else
......
......@@ -3,16 +3,21 @@ void recalcSetDetMac()
int rclCnt = 0;
Platform.postDefaultRule( $macdet );
String rclMacOld = $macdet;
// #######TODO 改写 LABEL与GOTO #### label RclStart
recalcSetdet();
// #######TODO 改写 LABEL与GOTO #### label setmac
Platform.postDefaultRule( $macdet );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $macdet.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $macdet;
rclCnt = rclCnt + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto RclStart
// #### label RclStart
RclStart:
while(true){
recalcSetdet();
// #### label setmac
Platform.postDefaultRule( $macdet );
// if this recalculation has changed internal MAC, restart calculation up to 20 times directly
if( Platform.compareTo(rclMacOld, $macdet.getValue()) != 0 && rclCnt <= 20 )
{
rclMacOld = $macdet;
rclCnt = rclCnt + 1;
//return ; // #### goto RclStart
continue RclStart;
}
break;
}
$macdetold = $macdet;
......
......@@ -22,7 +22,7 @@ String dtaGetFeesOwn(String argrol,String argdirflg,String argdspflg,int arglinn
chkdspflg = "S";
}
boolean allMisc = false;
// #######TODO 改写 LABEL与GOTO #### label Restart
// #### label Restart
RestartLabel:
while(true){
IStream res = new StreamImpl();
......@@ -79,7 +79,7 @@ String dtaGetFeesOwn(String argrol,String argdirflg,String argdspflg,int arglinn
if( ! allMisc )
{
allMisc = true;
//return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
//return ; // #### goto Restart
continue RestartLabel;
}
else
......
......@@ -29,7 +29,7 @@ String printSwiftFeeDetDspFun(String rol,String tag,String sel)
allow = 6;
}
boolean allMisc = false;
// #######TODO 改写 LABEL与GOTO #### label restart
// #### label restart
int entCnt = 0;
IStream res = new StreamImpl();
Platform.streamClear( res );
......@@ -194,7 +194,7 @@ String printSwiftFeeDetDspFun(String rol,String tag,String sel)
if( ! allMisc && ( Platform.compareTo( tag , "73" ) == 0 || Platform.compareTo( tag , "73A" ) == 0 ) && Platform.compareTo( $\trnmod\trndoc\doccur\mt , "754" ) == 0 )
{
allMisc = true;
//return ; // #######TODO 改写 LABEL与GOTO #### goto restart
//return ; // #### goto restart
continue restartLabel;
}
else
......
......@@ -53,7 +53,7 @@ void getRecvType()
if( Platform.compareTo( yn , "Y" ) == 0 )
{
Platform.message( #CT000540, recvType );
return ; // #######TODO 改写 LABEL与GOTO #### goto Done
return ; // #### goto Done
}
}
}
......@@ -61,6 +61,6 @@ void getRecvType()
}
}
}
// #######TODO 改写 LABEL与GOTO #### label Done
// #### label Done
}
\ No newline at end of file
......@@ -31,73 +31,80 @@ static void foruseSockCall(IStream instm,IStream outstm,Argument<Boolean> failed
{
while( trycount <= 5 && cmpFlag != true )
{
Platform.writeLog( "ForuseSEQ", #CT000013 );
fd = Platform.SockOpen( ip, port );
callError = Platform.errorCode();
if( callError != 0 )
{
Platform.writeLog( "ForuseSEQ", Platform.getText( #CT000014, Platform.errorCode() ) );
trnflg = "E";
trycount = trycount + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto endlab
}
Platform.setContext( "SOCKTIMEOUT", timeout );
Platform.SockCall( fd, instm, outStream );
//500
callError = Platform.errorCode();
if( callError != 0 )
{
Platform.writeLog( "ForuseSEQ", Platform.getText( #CT000015, Platform.errorCode() ) );
trnflg = "E";
trycount = trycount + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto endlab
}
Platform.SockClose( fd );
callError = Platform.errorCode();
if( callError != 0 )
{
Platform.writeLog( "ForuseSEQ", Platform.getText( #CT000016, Platform.errorCode() ) );
trnflg = "E";
trycount = trycount + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto endlab
}
/**
if $OutStream <> "0" then
WriteLog( "ForuseSEQ", GetText( 'L0000020', ErrorCode ) )
$TRNFLG = "E"
$Trycount = $Trycount + 1
goto endlab
endif
**/
if( ! Platform.isEmpty( outStream ) )
{
msg = "";
for(int i = 1;i <= Platform.streamCount( outStream );i++)
{
msg = msg + Platform.getLine( outStream, i );
}
pos = Platform.pos( msg, "|" );
outresult = Platform.mid( msg, 1, pos - 1 );
if( Platform.compareTo(outresult, "0") != 0 )
{
trnflg = "E";
}
else
{
trnflg = "";
}
/**
else
$result = -3
Error( 'L0000022' )
**/
}
if( Platform.compareTo(trnflg, "E") != 0 )
{
cmpFlag = true;
failed.value = true;
endlab:
while(true){
Platform.writeLog( "ForuseSEQ", #CT000013 );
fd = Platform.SockOpen( ip, port );
callError = Platform.errorCode();
if( callError != 0 )
{
Platform.writeLog( "ForuseSEQ", Platform.getText( #CT000014, Platform.errorCode() ) );
trnflg = "E";
trycount = trycount + 1;
//return ; // #### goto endlab
break endlab;
}
Platform.setContext( "SOCKTIMEOUT", timeout );
Platform.SockCall( fd, instm, outStream );
//500
callError = Platform.errorCode();
if( callError != 0 )
{
Platform.writeLog( "ForuseSEQ", Platform.getText( #CT000015, Platform.errorCode() ) );
trnflg = "E";
trycount = trycount + 1;
//return ; // #### goto endlab
break endlab;
}
Platform.SockClose( fd );
callError = Platform.errorCode();
if( callError != 0 )
{
Platform.writeLog( "ForuseSEQ", Platform.getText( #CT000016, Platform.errorCode() ) );
trnflg = "E";
trycount = trycount + 1;
//return ; // #### goto endlab
break endlab;
}
/**
if $OutStream <> "0" then
WriteLog( "ForuseSEQ", GetText( 'L0000020', ErrorCode ) )
$TRNFLG = "E"
$Trycount = $Trycount + 1
goto endlab
endif
**/
if( ! Platform.isEmpty( outStream ) )
{
msg = "";
for(int i = 1;i <= Platform.streamCount( outStream );i++)
{
msg = msg + Platform.getLine( outStream, i );
}
pos = Platform.pos( msg, "|" );
outresult = Platform.mid( msg, 1, pos - 1 );
if( Platform.compareTo(outresult, "0") != 0 )
{
trnflg = "E";
}
else
{
trnflg = "";
}
/**
else
$result = -3
Error( 'L0000022' )
**/
}
if( Platform.compareTo(trnflg, "E") != 0 )
{
cmpFlag = true;
failed.value = true;
}
break endlab;
}
// #######TODO 改写 LABEL与GOTO #### label endlab
// #### label endlab
trycount = trycount + 1;
}
if( callError == 502 )
......
......@@ -50,7 +50,7 @@ void updateSptSpr(#spt argspt,String argsptsta,String argsprsta)
Platform.dbCommit();
Platform.status( #CT000104, $spt\objnam.getValue(), $spt\txt.getValue() );
//ReadSPTSTM
// #######TODO 改写 LABEL与GOTO #### label LblEnd
// #### label LblEnd
Platform.sdbFree( argspt );
}
\ No newline at end of file
......@@ -54,7 +54,7 @@ void printSwtWithSMH(#smh insmh,String intitle)
default:
Platform.setErrorCode( 599, Platform.formatText( "GetViewFromSMH returned unknown format \'$1\'", viewFmt ) );
}
// #######TODO 改写 LABEL与GOTO #### label ErrorLabel
// #### label ErrorLabel
if( Platform.errorCode() > 0 )
{
Platform.message( #CT000259, $docimm\filename.getValue(), Platform.getErrorText(), Platform.errorCode() );
......
......@@ -112,7 +112,7 @@ void executeReject(String argsptinr)
//##########
msg = Platform.getText( #CT000285, filename, "Error", Platform.errorCode(), Platform.getErrorText() );
Platform.message( #CT000299, msg );
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd
return ; // #### goto LblEnd
}
else
{
......@@ -126,7 +126,7 @@ void executeReject(String argsptinr)
if( flag == false )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd
return ; // #### goto LblEnd
}
Platform.streamClear( strstream1 );
Platform.streamInsert( strstream1, 0, $infor.getValue() );
......@@ -148,7 +148,7 @@ void executeReject(String argsptinr)
// PromptOK( 'RG000292
}
}
// #######TODO 改写 LABEL与GOTO #### label LblEnd
// #### label LblEnd
Platform.clear( $smh );
}
else
......
......@@ -56,7 +56,7 @@ void printBOPWithNET(#bopnet insmh,String intitle)
default:
Platform.setErrorCode( 599, Platform.formatText( "GetViewFromSMH returned unknown format \'$1\'", viewFmt ) );
}
// #######TODO 改写 LABEL与GOTO #### label ErrorLabel
// #### label ErrorLabel
if( Platform.errorCode() > 0 )
{
Platform.message( #CT000613, $docimm\filename.getValue(), Platform.getErrorText(), Platform.errorCode() );
......
......@@ -114,7 +114,7 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
goto CloEnd
endif
**/
// #######TODO 改写 LABEL与GOTO #### label CloEnd
// #### label CloEnd
if( Platform.compareTo( rc.value , "E" ) == 0 )
{
Platform.dbRollback();
......
......@@ -31,44 +31,48 @@ void svsFldTblSet2VisibleFields()
stmCntFld = Platform.streamCount( fldStream );
for(int fldIdx = 1;fldIdx <= stmCntFld;fldIdx++)
{
fieldName = Platform.trim( Platform.getLine( fldStream, fldIdx ) );
if( Platform.isEmpty( fieldName ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
NextField:
while(true){
fieldName = Platform.trim( Platform.getLine( fldStream, fldIdx ) );
if( Platform.isEmpty( fieldName ) )
{
break NextField ; // #### goto NextField
}
field = Platform.getField( fieldName );
datatype = Platform.getAttribute( field, tdAttrDatatype );
switch( datatype )
{
case tdDataTypeText:
if( ! Platform.IsEnabled( field ) )
{
break NextField ; // #### goto NextField
}
viewType = Platform.getAttribute( field, tdAttrViewtype );
int tdViewTypeLabel = 0;
if( viewType == tdViewTypeLabel )
{
break NextField ; // #### goto NextField
}
break;
case tdDataTypeNumeric:
case tdDataTypeDate:
if( ! Platform.IsEnabled( field ) )
{
break NextField ; // #### goto NextField
}
break;
default:
break NextField ; // #### goto NextField
}
// if the same field appears twice, store only once
found = Platform.streamSearch( $frmfld, fieldName + " " );
if( found == 0 )
{
Platform.streamInsert( $frmfld.getValue(), 0, fieldName + " " );
}
break NextField;
}
field = Platform.getField( fieldName );
datatype = Platform.getAttribute( field, tdAttrDatatype );
switch( datatype )
{
case tdDataTypeText:
if( ! Platform.IsEnabled( field ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
}
viewType = Platform.getAttribute( field, tdAttrViewtype );
int tdViewTypeLabel = 0;
if( viewType == tdViewTypeLabel )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
}
break;
case tdDataTypeNumeric:
case tdDataTypeDate:
if( ! Platform.IsEnabled( field ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
}
break;
default:
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
}
// if the same field appears twice, store only once
found = Platform.streamSearch( $frmfld, fieldName + " " );
if( found == 0 )
{
Platform.streamInsert( $frmfld.getValue(), 0, fieldName + " " );
}
// #######TODO 改写 LABEL与GOTO #### label NextField
// #### label NextField
}
}
}
......
......@@ -30,47 +30,52 @@ void svsSsnSave(String argfld,String savetype)
Platform.streamSet( $frmfld.getValue(), $svsfld.getValue() );
int stmCnt = 0;
String content = NULLSTR;
if( Platform.isEmpty( $svs\inr ) || Platform.compareTo(Platform.getTransName(), $svs\dst.getValue()) != 0 || Platform.compareTo("S", $svs\subtyp.getValue()) != 0 || Platform.compareTo($\sysmod\ssn\inr.getValue(), $svs\subkey.getValue()) != 0 )
{
// if SVS is already read the following read/create on demand is not required
stmCnt = Platform.streamCount( $svsfld.getValue() );
if( stmCnt <= 0 )
{
if(1==1) return;
}
else
{
// read/ create SVS only if any SVE entry is required
for(int idx = 1;idx <= stmCnt;idx++)
SaveContent:
while(true){
if( Platform.isEmpty( $svs\inr ) || Platform.compareTo(Platform.getTransName(), $svs\dst.getValue()) != 0 || Platform.compareTo("S", $svs\subtyp.getValue()) != 0 || Platform.compareTo($\sysmod\ssn\inr.getValue(), $svs\subkey.getValue()) != 0 )
{
content = Platform.getLine( $svscon.getValue(), idx );
if( Platform.compareTo(content, "-") != 0 )
// if SVS is already read the following read/create on demand is not required
stmCnt = Platform.streamCount( $svsfld.getValue() );
if( stmCnt <= 0 )
{
if(1==1) return;
}
else
{
if( Platform.isEmpty( $svs\inr ) || Platform.compareTo(Platform.getTransName(), $svs\dst.getValue()) != 0 || Platform.compareTo("S", $svs\subtyp.getValue()) != 0 || Platform.compareTo($\sysmod\ssn\inr.getValue(), $svs\subkey.getValue()) != 0 )
// read/ create SVS only if any SVE entry is required
for(int idx = 1;idx <= stmCnt;idx++)
{
// Check whether a SVS-Entry for the session is stored
Platform.dbRead( $svs, Platform.getTransName(), "DST", "S", "SUBTYP", $\sysmod\ssn\inr.getValue(), "SUBKEY" );
if( Platform.errorCode() == tdOdbcNotFound )
content = Platform.getLine( $svscon.getValue(), idx );
if( Platform.compareTo(content, "-") != 0 )
{
$svs\nam = Platform.GetTitle();
$svs\dst = Platform.getTransName();
$svs\subtyp = "S";
$svs\subkey = $\sysmod\ssn\inr;
Platform.sdbInsert( $svs );
Platform.streamClear( $oldsvsfld.getValue() );
Platform.streamClear( $oldsvscon.getValue() );
$oldsubtyp = "S";
$oldsubkey = $\sysmod\ssn\inr;
if( Platform.isEmpty( $svs\inr ) || Platform.compareTo(Platform.getTransName(), $svs\dst.getValue()) != 0 || Platform.compareTo("S", $svs\subtyp.getValue()) != 0 || Platform.compareTo($\sysmod\ssn\inr.getValue(), $svs\subkey.getValue()) != 0 )
{
// Check whether a SVS-Entry for the session is stored
Platform.dbRead( $svs, Platform.getTransName(), "DST", "S", "SUBTYP", $\sysmod\ssn\inr.getValue(), "SUBKEY" );
if( Platform.errorCode() == tdOdbcNotFound )
{
$svs\nam = Platform.GetTitle();
$svs\dst = Platform.getTransName();
$svs\subtyp = "S";
$svs\subkey = $\sysmod\ssn\inr;
Platform.sdbInsert( $svs );
Platform.streamClear( $oldsvsfld.getValue() );
Platform.streamClear( $oldsvscon.getValue() );
$oldsubtyp = "S";
$oldsubkey = $\sysmod\ssn\inr;
}
break SaveContent ; // #### goto SaveContent
}
}
return ; // #######TODO 改写 LABEL与GOTO #### goto SaveContent
}
}
// no SVE handling necessary, as no modified entry exists
if(1==1) return;
}
}
// no SVE handling necessary, as no modified entry exists
if(1==1) return;
return;
}
// #######TODO 改写 LABEL与GOTO #### label SaveContent
// #### label SaveContent
svsSaveContent();
}
\ No newline at end of file
......@@ -6,50 +6,56 @@ static void lnkReturnToCallerKeepSPT(String argflg)
//! Corresponding functions: LnkReturnToCaller, LnkReturnToFirst, LnkExit
// To solve the problem in INFTRN (return to the same TRN, DO5DOS.2664)
Platform.streamClear( Platform.ddeSTREAM() );
// #######TODO 改写 LABEL与GOTO #### label PopFromStack
if( Platform.streamCount( $\sysmod\frmstk\stk.getValue() ) < 1 )
{
Platform.lnkReturnToFirst();
}
String lin = Platform.getLine( $\sysmod\frmstk\stk.getValue(), 1 );
int pos = Platform.pos( lin, "\t" );
String frm = NULLSTR;
if( pos == 0 )
{
frm = lin;
}
else
{
frm = Platform.mid( lin, 1, pos - 1 );
}
if( Platform.isEmpty( frm ) )
{
Platform.lnkReturnToFirst();
}
if( ! Platform.canLoad( frm + ".TRN" ) )
{
Platform.lnkReturnToFirst();
}
if( IsDesigner )
{
$\sysmod.internalCheckLocks( argflg );
$\sysmod.internalCheckDbCursor();
}
// In case any message is pending prompt the message
$\sysmod.internalPromptMsg();
if( Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "DIT" ) == 0 || Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "BDT" ) == 0 || Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "DET" ) == 0 || Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "BFT" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFDID" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFBDD" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFDET" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFBFD" ) == 0 )
{
Platform.setLang( "CN" );
}
else
{
Platform.setLang( "EN" );
}
$\sysmod\frmstk\curctx = Platform.mid( lin, pos + 1 );
Platform.streamDelete( $\sysmod\frmstk\stk.getValue(), 1 );
if( Platform.compareTo( Platform.toUpper( Platform.getTransName() ) , frm ) == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto PopFromStack
// #### label PopFromStack
String frm = null;
PopFromStack:
while(true){
if( Platform.streamCount( $\sysmod\frmstk\stk.getValue() ) < 1 )
{
Platform.lnkReturnToFirst();
}
String lin = Platform.getLine( $\sysmod\frmstk\stk.getValue(), 1 );
int pos = Platform.pos( lin, "\t" );
frm = NULLSTR;
if( pos == 0 )
{
frm = lin;
}
else
{
frm = Platform.mid( lin, 1, pos - 1 );
}
if( Platform.isEmpty( frm ) )
{
Platform.lnkReturnToFirst();
}
if( ! Platform.canLoad( frm + ".TRN" ) )
{
Platform.lnkReturnToFirst();
}
if( IsDesigner )
{
$\sysmod.internalCheckLocks( argflg );
$\sysmod.internalCheckDbCursor();
}
// In case any message is pending prompt the message
$\sysmod.internalPromptMsg();
if( Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "DIT" ) == 0 || Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "BDT" ) == 0 || Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "DET" ) == 0 || Platform.compareTo( Platform.mid( Platform.toUpper( frm ), 1, 3 ) , "BFT" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFDID" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFBDD" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFDET" ) == 0 || Platform.compareTo( Platform.toUpper( frm ) , "INFBFD" ) == 0 )
{
Platform.setLang( "CN" );
}
else
{
Platform.setLang( "EN" );
}
$\sysmod\frmstk\curctx = Platform.mid( lin, pos + 1 );
Platform.streamDelete( $\sysmod\frmstk\stk.getValue(), 1 );
if( Platform.compareTo( Platform.toUpper( Platform.getTransName() ) , frm ) == 0 )
{
//return ; // #### goto PopFromStack
continue PopFromStack;
}
break;
}
Platform.saveData( $\sysmod\spt, Platform.sysStream(), "SPT" );
$\sysmod.internalHandlePassingEty();
......
......@@ -8,46 +8,51 @@ static void ddeSendStream(String argtrn,String argtop,IStream argstr)
String ddeTopic = argtop + "_" + $\sysmod.getSystemName();
BigDecimal del = new BigDecimal("0");
BigDecimal tim = new BigDecimal("0");
// #######TODO 改写 LABEL与GOTO #### label CheckTarget
IStream str = new StreamImpl();
String msg = NULLSTR;
if( Platform.ddeTestTopic( trigger, ddeTopic ) )
{
Platform.ddeSend( trigger, ddeTopic, argstr );
if( Platform.compareTo(del , 0)>0 )
{
Platform.status( "" );
}
}
else
{
if( Platform.compareTo( del , 0 ) == 0 )
{
Platform.streamClear( str );
Platform.ddeSend( trigger, argtrn, str );
Platform.status( #CT000358, argtrn );
del = new BigDecimal("0.4");
}
if( Platform.compareTo(tim , 15)<0 )
{
Platform.pause( del );
tim = Platform.numAdd(tim , del);
// $Del = $Del * 2
return ; // #######TODO 改写 LABEL与GOTO #### goto CheckTarget
}
else
{
Platform.status( #CT000359, argtrn );
msg = Platform.getText( #CT000357, argtrn, Platform.toInt( tim ) );
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
// #### label CheckTarget
CheckTarget:
while(true){
IStream str = new StreamImpl();
String msg = NULLSTR;
if( Platform.ddeTestTopic( trigger, ddeTopic ) )
{
Platform.message( "$1", msg );
Platform.ddeSend( trigger, ddeTopic, argstr );
if( Platform.compareTo(del , 0)>0 )
{
Platform.status( "" );
}
}
else
{
Platform.setContext( "LOGFILEENTRY", msg );
if( Platform.compareTo( del , 0 ) == 0 )
{
Platform.streamClear( str );
Platform.ddeSend( trigger, argtrn, str );
Platform.status( #CT000358, argtrn );
del = new BigDecimal("0.4");
}
if( Platform.compareTo(tim , 15)<0 )
{
Platform.pause( del );
tim = Platform.numAdd(tim , del);
// $Del = $Del * 2
//return ; // #### goto CheckTarget
continue CheckTarget;
}
else
{
Platform.status( #CT000359, argtrn );
msg = Platform.getText( #CT000357, argtrn, Platform.toInt( tim ) );
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
{
Platform.message( "$1", msg );
}
else
{
Platform.setContext( "LOGFILEENTRY", msg );
}
}
}
}
break;
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@ void getbranch()
{
Platform.sysDump( Platform.getText( #CT000551, $\sysmod\usr\extkey.getValue() ) );
}
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
return ; // #### goto ENDDO
}
// if a default client exists then take this client
int err = 0;
......@@ -67,7 +67,7 @@ void getbranch()
{
Platform.errorMessage( #CT000414, Platform.errorCode(), errmsg );
Platform.dbCloseCursor();
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
......@@ -80,7 +80,7 @@ void getbranch()
Platform.dbCloseCursor();
}
}
// #######TODO 改写 LABEL与GOTO #### label ENDDO
// #### label ENDDO
if(1==1) return;
}
\ No newline at end of file
......@@ -20,7 +20,8 @@ void getbchkey_cp()
{
Platform.sysDump( Platform.getText( #CT000549, $\sysmod\usr\extkey.getValue() ) );
}
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
Platform.sqlSetCommittedRead();
return ; // #### goto ENDDO
}
// if a default client exists then take this client
int err = 0;
......@@ -54,7 +55,8 @@ void getbchkey_cp()
if( Platform.compareTo( $bch\bchtyp , "0" ) == 0 )
{ //THE BRANCH TYPE JUDGED
Platform.streamSet( $frmstk\bchkey.getValue(), "FALSE" );
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
Platform.sqlSetCommittedRead();
return ; // #### goto ENDDO
}
streamcount = 0;
Platform.streamClear( errmsg );
......@@ -72,7 +74,8 @@ void getbchkey_cp()
{
Platform.errorMessage( #CT000420, Platform.errorCode(), errmsg );
Platform.dbCloseCursor();
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
Platform.sqlSetCommittedRead();
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
......@@ -84,7 +87,7 @@ void getbchkey_cp()
}
Platform.dbCloseCursor();
}
// #######TODO 改写 LABEL与GOTO #### label ENDDO
// #### label ENDDO
Platform.sqlSetCommittedRead();
if(1==1) return;
......
......@@ -18,7 +18,8 @@ void getbranch_cp()
{
Platform.sysDump( Platform.getText( #CT000547, $\sysmod\usr\extkey.getValue() ) );
}
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
Platform.sqlSetCommittedRead();
return ; // #### goto ENDDO
}
// if a default client exists then take this client
int err = 0;
......@@ -66,7 +67,8 @@ void getbranch_cp()
{
Platform.errorMessage( #CT000418, Platform.errorCode(), errmsg );
Platform.dbCloseCursor();
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
Platform.sqlSetCommittedRead();
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
......@@ -79,7 +81,7 @@ void getbranch_cp()
Platform.dbCloseCursor();
}
}
// #######TODO 改写 LABEL与GOTO #### label ENDDO
// #### label ENDDO
Platform.sqlSetCommittedRead();
if(1==1) return;
......
......@@ -20,7 +20,7 @@ void getbchkey()
{
Platform.sysDump( Platform.getText( #CT000553, $\sysmod\usr\extkey.getValue() ) );
}
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
return ; // #### goto ENDDO
}
// if a default client exists then take this client
int err = 0;
......@@ -51,7 +51,7 @@ void getbchkey()
if( Platform.compareTo( $bch\bchtyp , "0" ) == 0 )
{ //THE BRANCH TYPE JUDGED
Platform.streamSet( $frmstk\bchkey.getValue(), "FALSE" );
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
return ; // #### goto ENDDO
}
streamcount = 0;
Platform.streamClear( errmsg );
......@@ -78,7 +78,7 @@ void getbchkey()
{
Platform.errorMessage( #CT000424, Platform.errorCode(), errmsg );
Platform.dbCloseCursor();
return ; // #######TODO 改写 LABEL与GOTO #### goto ENDDO
return ; // #### goto ENDDO
}
branch = "";
Platform.dbFetchFields( "", branch );
......@@ -90,7 +90,7 @@ void getbchkey()
}
Platform.dbCloseCursor();
}
// #######TODO 改写 LABEL与GOTO #### label ENDDO
// #### label ENDDO
if(1==1) return;
}
\ No newline at end of file
......@@ -64,7 +64,7 @@ String runTrngetData(String srvnam,String calltp,String trninr,String itfinr,Str
}
else
{
return ""; // #######TODO 改写 LABEL与GOTO #### goto enddo
return outtxt; // #### goto enddo
}
}
break;
......@@ -77,11 +77,11 @@ String runTrngetData(String srvnam,String calltp,String trninr,String itfinr,Str
}
else
{
return ""; // #######TODO 改写 LABEL与GOTO #### goto enddo
return outtxt; // #### goto enddo
}
break;
}
// #######TODO 改写 LABEL与GOTO #### label enddo
// #### label enddo
return outtxt;
}
\ No newline at end of file
......@@ -72,7 +72,7 @@ void getXDInfo()
if( ! Platform.isEmpty( Platform.getContent( "\\FFTFLAG" ) ) )
{
pjjh = "";
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
xxd = "BPD";
break;
......@@ -1215,7 +1215,7 @@ void getXDInfo()
{
Platform.exitEvent();
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
}
}
\ No newline at end of file
......@@ -45,20 +45,24 @@ init $$\ order 9000500
Platform.setContext( tdContextBATCHMODE, true );
}
}
// #######TODO 改写 LABEL与GOTO #### label ChkStk
// #### label ChkStk
// Check the stack and remove the own entry if found
String lin = Platform.getLine( $\sysmod\frmstk\stk.getValue(), 1 );
String frm = Platform.getTransName();
int pos = 0;
if( Platform.compareTo( frm , Platform.mid( lin, 1, Platform.len( frm ) ) ) == 0 )
{
pos = Platform.pos( lin, "\t" );
if( pos > 0 )
{
$\sysmod\frmstk\curctx = Platform.mid( lin, pos + 1 );
}
Platform.streamDelete( $\sysmod\frmstk\stk.getValue(), 1 );
return ; // #######TODO 改写 LABEL与GOTO #### goto ChkStk
ChkStk:
while(true){
String lin = Platform.getLine( $\sysmod\frmstk\stk.getValue(), 1 );
String frm = Platform.getTransName();
int pos = 0;
if( Platform.compareTo( frm , Platform.mid( lin, 1, Platform.len( frm ) ) ) == 0 )
{
pos = Platform.pos( lin, "\t" );
if( pos > 0 )
{
$\sysmod\frmstk\curctx = Platform.mid( lin, pos + 1 );
}
Platform.streamDelete( $\sysmod\frmstk\stk.getValue(), 1 );
//return ; // #### goto ChkStk
continue ChkStk;
}
break;
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@ String getOSAccessibleName(String argfilename)
nonDel = "/";
}
// Loop to replace the wrong delimiter by the correct ones
// #######TODO 改写 LABEL与GOTO #### label NextDel
// #### label NextDel
int pos;
NextDelLabel:
while(true){
......@@ -28,7 +28,7 @@ String getOSAccessibleName(String argfilename)
if( pos > 0 )
{
fil = Platform.mid( fil, 1, pos - 1 ) + del + Platform.mid( fil, pos + 1 );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextDel
//return ; // #### goto NextDel
continue NextDelLabel;
}
break;
......@@ -44,7 +44,7 @@ String getOSAccessibleName(String argfilename)
}
// Look for included illegal character and remove them
// single quote, double quote, execute quote
// #######TODO 改写 LABEL与GOTO #### label quoloop
// #### label quoloop
quoloopLabel:
while(true){
pos = Platform.pos( fil, "'" );
......@@ -59,7 +59,7 @@ String getOSAccessibleName(String argfilename)
if( pos > 0 )
{
fil = Platform.mid( fil, 1, pos - 1 ) + Platform.mid( fil, pos + 1 );
//return ; // #######TODO 改写 LABEL与GOTO #### goto quoloop
//return ; // #### goto quoloop
continue quoloopLabel;
}
break;
......
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