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