Commit 2f67ac06 by wangguangchao

a-r goto语法转换修改提交

parent fbc65b7d
...@@ -16,7 +16,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu ...@@ -16,7 +16,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{ {
if( ! atcConditionTrue( $atcsub\atcdia\ignflg.getValue(), $atcsub\atcdia\cnd.getValue(), $atcsub\atcdia\cndfld1typ.getValue(), $atcsub\atcdia\cndfld1.getValue(), $atcsub\atcdia\cndfld2typ.getValue(), $atcsub\atcdia\cndfld2.getValue() ) ) if( ! atcConditionTrue( $atcsub\atcdia\ignflg.getValue(), $atcsub\atcdia\cnd.getValue(), $atcsub\atcdia\cndfld1typ.getValue(), $atcsub\atcdia\cndfld1.getValue(), $atcsub\atcdia\cndfld2typ.getValue(), $atcsub\atcdia\cndfld2.getValue() ) )
{ {
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry //return ; // #### goto NextEntry
continue NextEntryLabel; continue NextEntryLabel;
} }
arggroup.value = $atcsub\atcdia\grp; arggroup.value = $atcsub\atcdia\grp;
...@@ -30,7 +30,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu ...@@ -30,7 +30,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
break; break;
default: default:
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), "Function not defined" ); atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), "Function not defined" );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry //return ; // #### goto NextEntry
continue NextEntryLabel; continue NextEntryLabel;
} }
break; break;
...@@ -40,7 +40,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu ...@@ -40,7 +40,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{ {
errTxt = Platform.getErrorText(); errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt ); atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry //return ; // #### goto NextEntry
continue NextEntryLabel; continue NextEntryLabel;
} }
break; break;
...@@ -50,7 +50,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu ...@@ -50,7 +50,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{ {
errTxt = Platform.getErrorText(); errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt ); atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry //return ; // #### goto NextEntry
continue NextEntryLabel; continue NextEntryLabel;
} }
break; break;
...@@ -62,14 +62,14 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu ...@@ -62,14 +62,14 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{ {
errTxt = Platform.getErrorText(); errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DATNUM", Platform.toString( $atcsub\atcdia\datnum.getValue() ), errTxt ); atcCallSysdumpInfo( "ATCDIA\\DATNUM", Platform.toString( $atcsub\atcdia\datnum.getValue() ), errTxt );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry //return ; // #### goto NextEntry
continue NextEntryLabel; continue NextEntryLabel;
} }
} }
// no creation of diary, if date empty // no creation of diary, if date empty
if( Platform.isEmpty( argdate.value ) ) if( Platform.isEmpty( argdate.value ) )
{ {
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry //return ; // #### goto NextEntry
continue NextEntryLabel; continue NextEntryLabel;
} }
argcod.value = $atcsub\atcdia\cod; argcod.value = $atcsub\atcdia\cod;
......
...@@ -12,7 +12,9 @@ String cbsGetUnbalancedExtIds(IModule obj,String cbcarg) ...@@ -12,7 +12,9 @@ String cbsGetUnbalancedExtIds(IModule obj,String cbcarg)
String sql = "Where OBJTYP = '" + Platform.recGetObj( obj ) + "' AND OBJINR = '" + Platform.recGetInr( obj ) + "'"; String sql = "Where OBJTYP = '" + Platform.recGetObj( obj ) + "' AND OBJINR = '" + Platform.recGetInr( obj ) + "'";
sql = sql + " AND CBC = '" + cbcarg + "' ORDER BY EXTID ASC, BEGDAT DESC, INR DESC"; sql = sql + " AND CBC = '" + cbcarg + "' ORDER BY EXTID ASC, BEGDAT DESC, INR DESC";
Platform.dbSelectCursor( $cbb, sql ); Platform.dbSelectCursor( $cbb, sql );
// #######TODO 改写 LABEL与GOTO #### label CBBLoop // #### label CBBLoop
CBBLoopLabel:
while(true){
Platform.DBFetch( $cbb ); Platform.DBFetch( $cbb );
while( Platform.errorCode() <= 0 ) while( Platform.errorCode() <= 0 )
{ {
...@@ -38,13 +40,16 @@ String cbsGetUnbalancedExtIds(IModule obj,String cbcarg) ...@@ -38,13 +40,16 @@ String cbsGetUnbalancedExtIds(IModule obj,String cbcarg)
} }
lastId = $cbb\extid; lastId = $cbb\extid;
} }
continue ; // #######TODO 改写 LABEL与GOTO #### goto CBBLoop //continue ; // #### goto CBBLoop
continue CBBLoopLabel;
}
break CBBLoopLabel;
} }
if( ! Platform.isEmpty( emptyId ) ) if( ! Platform.isEmpty( emptyId ) )
{ {
extIds = "\r\n" + extIds; extIds = "\r\n" + extIds;
} }
// #######TODO 改写 LABEL与GOTO #### label CBBDone // #### label CBBDone
return extIds; return extIds;
} }
\ No newline at end of file
...@@ -13,7 +13,9 @@ String internalGenSqlSet(String argliste) ...@@ -13,7 +13,9 @@ String internalGenSqlSet(String argliste)
String rtn = NULLSTR; String rtn = NULLSTR;
IStream argstm = new StreamImpl(); IStream argstm = new StreamImpl();
Platform.streamClear( argstm ); Platform.streamClear( argstm );
// #######TODO 改写 LABEL与GOTO #### label NxtElm // #### label NxtElm
NxtElmLabel:
while(true){
// Search for next delimiter // Search for next delimiter
while(begPos <= MdaUtilsEx.len(argliste)) { while(begPos <= MdaUtilsEx.len(argliste)) {
int len = Platform.pos( Platform.mid( argliste, begPos ), "," ); int len = Platform.pos( Platform.mid( argliste, begPos ), "," );
...@@ -24,7 +26,7 @@ String internalGenSqlSet(String argliste) ...@@ -24,7 +26,7 @@ String internalGenSqlSet(String argliste)
if( begPos == 1 ) if( begPos == 1 )
{ {
rtn = " = " + Platform.sqlLit( argliste ); rtn = " = " + Platform.sqlLit( argliste );
return rtn; // #######TODO 改写 LABEL与GOTO #### goto Done return rtn; // #### goto Done
} }
// if no delimiter found, take rest // if no delimiter found, take rest
len = Platform.len( Platform.mid( argliste, begPos ) ) + 1; len = Platform.len( Platform.mid( argliste, begPos ) ) + 1;
...@@ -43,10 +45,13 @@ String internalGenSqlSet(String argliste) ...@@ -43,10 +45,13 @@ String internalGenSqlSet(String argliste)
begPos = begPos + len; begPos = begPos + len;
if( begPos <= Platform.len( argliste ) ) if( begPos <= Platform.len( argliste ) )
{ {
continue; // #######TODO 改写 LABEL与GOTO #### goto NxtElm //continue; // #### goto NxtElm
continue NxtElmLabel;
} }
} }
} }
break NxtElmLabel;
}
// transform list of values into the set format // transform list of values into the set format
String list = ""; String list = "";
String con = ""; String con = "";
...@@ -57,7 +62,7 @@ String internalGenSqlSet(String argliste) ...@@ -57,7 +62,7 @@ String internalGenSqlSet(String argliste)
con = ","; con = ",";
} }
rtn = " IN (" + list + ")"; rtn = " IN (" + list + ")";
// #######TODO 改写 LABEL与GOTO #### label Done // #### label Done
return rtn; return rtn;
} }
\ No newline at end of file
...@@ -26,7 +26,9 @@ void createCbbEntries(#cbe rec) ...@@ -26,7 +26,9 @@ void createCbbEntries(#cbe rec)
} }
// Insert CBB-records for all relevant CBC-s depending on CBT // Insert CBB-records for all relevant CBC-s depending on CBT
int idx = 1; int idx = 1;
// #######TODO 改写 LABEL与GOTO #### label CBBLoop // #### label CBBLoop
CBBLoopLabel:
while(true){
String blk = Platform.getLine( cbcBlk, idx ); String blk = Platform.getLine( cbcBlk, idx );
if( Platform.isEmpty( blk ) ) if( Platform.isEmpty( blk ) )
{ {
...@@ -73,6 +75,8 @@ void createCbbEntries(#cbe rec) ...@@ -73,6 +75,8 @@ void createCbbEntries(#cbe rec)
Platform.reraise(); Platform.reraise();
} }
idx = idx + 1; idx = idx + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto CBBLoop //return ; // #### goto CBBLoop
continue CBBLoopLabel;
}
} }
\ No newline at end of file
...@@ -50,7 +50,9 @@ void deleteCbbEntries(#cbe cbearg) ...@@ -50,7 +50,9 @@ void deleteCbbEntries(#cbe cbearg)
} }
} }
int idx = 0; int idx = 0;
// #######TODO 改写 LABEL与GOTO #### label DelLoop // #### label DelLoop
DelLoopLabel:
while(true){
idx = idx + 1; idx = idx + 1;
if( idx > Platform.streamCount( stream ) ) if( idx > Platform.streamCount( stream ) )
{ {
...@@ -78,6 +80,8 @@ void deleteCbbEntries(#cbe cbearg) ...@@ -78,6 +80,8 @@ void deleteCbbEntries(#cbe cbearg)
// Delete the CBS-Balance entry // Delete the CBS-Balance entry
Platform.dbRead( $\cbsmod\cbb, inr, "INR" ); Platform.dbRead( $\cbsmod\cbb, inr, "INR" );
Platform.sdbRngDelete( $\cbsmod\cbb ); Platform.sdbRngDelete( $\cbsmod\cbb );
return ; // #######TODO 改写 LABEL与GOTO #### goto DelLoop //return ; // #### goto DelLoop
continue DelLoopLabel;
}
} }
\ No newline at end of file
...@@ -50,11 +50,13 @@ void commitCbbEntries(#cbe cbearg) ...@@ -50,11 +50,13 @@ void commitCbbEntries(#cbe cbearg)
} }
} }
int idx = 0; int idx = 0;
// #######TODO 改写 LABEL与GOTO #### label UpdLoop // #### label UpdLoop
UpdLoopLabel:
while(true){
idx = idx + 1; idx = idx + 1;
if( idx > Platform.streamCount( stream ) ) if( idx > Platform.streamCount( stream ) )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto UpdDone return ; // #### goto UpdDone
} }
lin = Platform.getLine( stream, idx ); lin = Platform.getLine( stream, idx );
opr = Platform.mid( lin, 1, 1 ); opr = Platform.mid( lin, 1, 1 );
...@@ -87,7 +89,9 @@ void commitCbbEntries(#cbe cbearg) ...@@ -87,7 +89,9 @@ void commitCbbEntries(#cbe cbearg)
{ {
Platform.reraise(); Platform.reraise();
} }
return ; // #######TODO 改写 LABEL与GOTO #### goto UpdLoop //return ; // #### goto UpdLoop
// #######TODO 改写 LABEL与GOTO #### label UpdDone continue UpdLoopLabel;
}
// #### label UpdDone
} }
\ No newline at end of file
...@@ -27,7 +27,7 @@ void saveConDataAndCallTrn(String argtrn) ...@@ -27,7 +27,7 @@ void saveConDataAndCallTrn(String argtrn)
if( !que ) if( !que )
{ {
Platform.clear( $\sysmod\spt ); Platform.clear( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd return ; // #### goto LblEnd
} }
} }
else else
...@@ -43,7 +43,7 @@ void saveConDataAndCallTrn(String argtrn) ...@@ -43,7 +43,7 @@ void saveConDataAndCallTrn(String argtrn)
{ {
Platform.message( #CT000027, sptEty ); Platform.message( #CT000027, sptEty );
Platform.dbFree( $\sysmod\spt ); Platform.dbFree( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd return ; // #### goto LblEnd
} }
} }
} }
...@@ -53,7 +53,7 @@ void saveConDataAndCallTrn(String argtrn) ...@@ -53,7 +53,7 @@ void saveConDataAndCallTrn(String argtrn)
} }
Platform.message( #CT000026, $\sysmod\spt\frm.getValue() ); Platform.message( #CT000026, $\sysmod\spt\frm.getValue() );
Platform.dbFree( $\sysmod\spt ); Platform.dbFree( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd return ; // #### goto LblEnd
} }
} }
} }
...@@ -69,6 +69,6 @@ void saveConDataAndCallTrn(String argtrn) ...@@ -69,6 +69,6 @@ void saveConDataAndCallTrn(String argtrn)
Platform.clear( $\sysmod\spt ); Platform.clear( $\sysmod\spt );
saveConData(); saveConData();
Platform.lnkCallTransaction( argtrn ); Platform.lnkCallTransaction( argtrn );
// #######TODO 改写 LABEL与GOTO #### label LblEnd // #### label LblEnd
} }
\ No newline at end of file
...@@ -2,7 +2,25 @@ void printAddressBlk(String user,String charArg,String user1) ...@@ -2,7 +2,25 @@ void printAddressBlk(String user,String charArg,String user1)
{ {
if( Platform.isEmpty( user ) ) if( Platform.isEmpty( user ) )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto this //return ; // #### goto this
// #### label this
if( ! Platform.isEmpty( Platform.getContent( user1 + "\\ADRBLK" ) ) )
{
for(int i = 1;i <= 4;i++)
{
if( ! Platform.isEmpty( Platform.getLine( Platform.getContent( user1 + "\\ADRBLK" ), i ) ) )
{
if( i == 1 )
{
Platform.printTempUsing( "ditopn.adrlin", charArg, Platform.getLine( Platform.getContent( user1 + "\\ADRBLK" ), i ));
}
else
{
Platform.printTempUsing( "ditopn.adrlin", "", Platform.getLine( Platform.getContent( user1 + "\\ADRBLK" ), i ));
}
}
}
}
} }
else else
{ {
...@@ -40,7 +58,7 @@ void printAddressBlk(String user,String charArg,String user1) ...@@ -40,7 +58,7 @@ void printAddressBlk(String user,String charArg,String user1)
} }
else else
{ {
// #######TODO 改写 LABEL与GOTO #### label this // #### label this
if( ! Platform.isEmpty( Platform.getContent( user1 + "\\ADRBLK" ) ) ) if( ! Platform.isEmpty( Platform.getContent( user1 + "\\ADRBLK" ) ) )
{ {
for(int i = 1;i <= 4;i++) for(int i = 1;i <= 4;i++)
......
...@@ -35,7 +35,9 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm) ...@@ -35,7 +35,9 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm)
if( Platform.len( code ) > 3 ) if( Platform.len( code ) > 3 )
{ {
// no action, as it`s not a code // no action, as it`s not a code
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd //return ; // #### goto LblEnd
Platform.streamInsert( argtarstm, 0, line );
continue;
} }
desc = ""; desc = "";
Platform.streamClear( descStm ); Platform.streamClear( descStm );
...@@ -44,7 +46,9 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm) ...@@ -44,7 +46,9 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm)
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
// no action, the file must not exist // no action, the file must not exist
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd //return ; // #### goto LblEnd
Platform.streamInsert( argtarstm, 0, line );
continue;
} }
Platform.streamClear( tmpStm ); Platform.streamClear( tmpStm );
trimStream( descStm, tmpStm ); trimStream( descStm, tmpStm );
...@@ -59,7 +63,7 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm) ...@@ -59,7 +63,7 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm)
line = Platform.mid( line, 1, endPos ) + code + " " + desc + Platform.mid( line, nextPos ); line = Platform.mid( line, 1, endPos ) + code + " " + desc + Platform.mid( line, nextPos );
} }
} }
// #######TODO 改写 LABEL与GOTO #### label LblEnd // #### label LblEnd
Platform.streamInsert( argtarstm, 0, line ); Platform.streamInsert( argtarstm, 0, line );
} }
......
...@@ -29,7 +29,8 @@ void setCORTYP() ...@@ -29,7 +29,8 @@ void setCORTYP()
{ {
if( Platform.searchBlock( $valcortyp.getValue(), cortyp ) == 0 ) if( Platform.searchBlock( $valcortyp.getValue(), cortyp ) == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NextIdx //return ; // #### goto NextIdx
continue;
} }
} }
switch( cortyp ) switch( cortyp )
...@@ -142,7 +143,7 @@ void setCORTYP() ...@@ -142,7 +143,7 @@ void setCORTYP()
setval = setval + cortyp + "\r\n"; setval = setval + cortyp + "\r\n";
} }
} }
// #######TODO 改写 LABEL与GOTO #### label NextIdx // #### label NextIdx
} }
// if CORTYP is not allowed, ignore manual input and redefault // if CORTYP is not allowed, ignore manual input and redefault
if( Platform.searchBlock( setval, $cortyp.getValue() ) == 0 ) if( Platform.searchBlock( setval, $cortyp.getValue() ) == 0 )
...@@ -177,7 +178,7 @@ void setCORTYP() ...@@ -177,7 +178,7 @@ void setCORTYP()
{ {
Platform.disable( $cortyp ); Platform.disable( $cortyp );
} }
// #######TODO 改写 LABEL与GOTO #### label nodef // #### label nodef
setOldValues(); setOldValues();
//if IsModified( CORTYP ) then //if IsModified( CORTYP ) then
// ResetModified( CORTYP ) // ResetModified( CORTYP )
......
...@@ -9,12 +9,12 @@ check $adrbic order 1000 ...@@ -9,12 +9,12 @@ check $adrbic order 1000
if( Platform.compareTo( $cortyp.getValue() , "SWT" ) == 0 && Platform.isEmpty( $adrbic ) ) if( Platform.compareTo( $cortyp.getValue() , "SWT" ) == 0 && Platform.isEmpty( $adrbic ) )
{ {
Platform.errorMessage( #CT000086 ); Platform.errorMessage( #CT000086 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done return ; // #### goto done
} }
$\trnmod\ptsmod\adrdef.checkADRBIC ( $adrbic.getValue() ); $\trnmod\ptsmod\adrdef.checkADRBIC ( $adrbic.getValue() );
} }
} }
} }
// #######TODO 改写 LABEL与GOTO #### label done // #### label done
} }
\ No newline at end of file
...@@ -11,11 +11,12 @@ String getCORTYPValuesPopup() ...@@ -11,11 +11,12 @@ String getCORTYPValuesPopup()
{ {
if( Platform.searchBlock( $valcortyp.getValue(), cortyp ) == 0 ) if( Platform.searchBlock( $valcortyp.getValue(), cortyp ) == 0 )
{ {
return setval = setval + cortyp + "\r\n"; // #######TODO 改写 LABEL与GOTO #### goto NextIdx //return setval = setval + cortyp + "\r\n"; // #### goto NextIdx
continue;
} }
} }
setval = setval + cortyp + "\r\n"; setval = setval + cortyp + "\r\n";
// #######TODO 改写 LABEL与GOTO #### label NextIdx // #### label NextIdx
} }
return setval; return setval;
......
...@@ -90,7 +90,7 @@ void printAllTags() ...@@ -90,7 +90,7 @@ void printAllTags()
} }
break; break;
case "A": // Display all parts of ASCIN (handle multiple messages) case "A": // Display all parts of ASCIN (handle multiple messages)
// #######TODO 改写 LABEL与GOTO #### label LabelAllParts // #### label LabelAllParts
Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message
total = splitMsgDTAInc(); total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++) for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
...@@ -175,7 +175,71 @@ void printAllTags() ...@@ -175,7 +175,71 @@ void printAllTags()
if( Platform.errorCode() == -500 ) if( Platform.errorCode() == -500 )
{ {
// splitting is not possible (no :EOH:, TradeConnect message show complete message) // splitting is not possible (no :EOH:, TradeConnect message show complete message)
return ; // #######TODO 改写 LABEL与GOTO #### goto LabelAllParts // return ; // #### goto LabelAllParts
Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message
total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
{
if( total <= 1 )
{
// ASCIN contains single logical file
}
else
{
Platform.clear( $lastfilename );
line = Platform.getLine( $msgctl.getValue(), logicalFileIdx );
start = Platform.parseInt( Platform.mid( line, 1, 8 ) );
end = Platform.parseInt( Platform.mid( line, 9, 8 ) );
Platform.streamClear( $ascin.getValue() );
for(int i = start;i <= end;i++)
{
Platform.streamInsert( $ascin.getValue(), 0, Platform.getLine( msgstream, i ) );
}
// ASCIN contains logical file number `$LogicalFileIdx`
}
msgpos = 0;
do
{
msglen = -1;
Argument<Integer> msgposBox = new Argument<Integer>("",msgpos);
Argument<Integer> msglenBox = new Argument<Integer>("",msglen);
analyseSwiftStream( msgposBox, msglenBox, $smh\cortyp.getValue() );
msgpos = msgposBox.value;
msglen = msglenBox.value;
if( Platform.errorCode() > 0 )
{
printLine( Platform.getText( #CT000198, $filename.getValue(), Platform.errorCode(), Platform.getErrorText() ) );
msglen = 0;
}
else
{
if( msglen > 7 )
{
// Delete repetition of header for Tradeconnect/DTALC Trailer
// (Swift body fields are alway numeric)
zline = Platform.streamSearch( $namestream, "Z" );
if( zline > 1 )
{
if( Platform.compareTo( Platform.mid( Platform.getLine( $namestream.getValue(), zline - 1 ), 1, 1 ) , "A" ) == 0 )
{
for(int delidx = 1;delidx <= zline - 1;delidx++)
{
Platform.streamDelete( $namestream.getValue(), 1 );
}
}
}
if( ! Platform.isEmpty( $namestream ) )
{
printAllFldStream( true );
printLine( " " );
}
msgpos = msgpos + msglen;
}
}
}while (!( msglen < 7 ));
}
} }
if( total > 1 ) if( total > 1 )
{ {
......
...@@ -81,7 +81,7 @@ void printDocFromSMH(#smh insmh,#prt inprt,String outfilename) ...@@ -81,7 +81,7 @@ void printDocFromSMH(#smh insmh,#prt inprt,String outfilename)
default: default:
Platform.setErrorCode( 599, Platform.formatText( "GetViewerFromSMH returned format \'$1\' which cannot be printed", viewFmt ) ); Platform.setErrorCode( 599, Platform.formatText( "GetViewerFromSMH returned format \'$1\' which cannot be printed", viewFmt ) );
} }
// #######TODO 改写 LABEL与GOTO #### label ErrorLabel // #### label ErrorLabel
String dummy = getTagSupFile( $smh\cortyp.getValue() ); String dummy = getTagSupFile( $smh\cortyp.getValue() );
if( Platform.errorCode() == 0 ) if( Platform.errorCode() == 0 )
{ {
......
...@@ -188,7 +188,12 @@ void popupDocWithSMH(#smh insmh,String intitle) ...@@ -188,7 +188,12 @@ void popupDocWithSMH(#smh insmh,String intitle)
if( ! Platform.fileExists( $filename.getValue() ) ) if( ! Platform.fileExists( $filename.getValue() ) )
{ {
Platform.setErrorCode( 1, Platform.getText( #CT000383, $filename.getValue() ) ); Platform.setErrorCode( 1, Platform.getText( #CT000383, $filename.getValue() ) );
return ; // #######TODO 改写 LABEL与GOTO #### goto ErrorLabel //return ; // #### goto ErrorLabel
if( Platform.errorCode() > 0 )
{
Platform.message( #CT000367, $filename.getValue(), Platform.getErrorText(), Platform.errorCode() );
}
if(1==1) return;
} }
$\sysmod\syspth.showLocalCopy( "", $filename.getValue(), "" ); $\sysmod\syspth.showLocalCopy( "", $filename.getValue(), "" );
break; break;
...@@ -202,7 +207,7 @@ void popupDocWithSMH(#smh insmh,String intitle) ...@@ -202,7 +207,7 @@ void popupDocWithSMH(#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( #CT000367, $filename.getValue(), Platform.getErrorText(), Platform.errorCode() ); Platform.message( #CT000367, $filename.getValue(), Platform.getErrorText(), Platform.errorCode() );
......
...@@ -5,7 +5,9 @@ int splitMsgDTAInc() ...@@ -5,7 +5,9 @@ int splitMsgDTAInc()
Platform.clear( $msgctl ); // list of start/end line per message Platform.clear( $msgctl ); // list of start/end line per message
int nextA1 = Platform.streamSearch( $ascin, ":A1:" ); int nextA1 = Platform.streamSearch( $ascin, ":A1:" );
int start = 1; int start = 1;
// #######TODO 改写 LABEL与GOTO #### label SearchNextA1 // #### label SearchNextA1
SearchNextA1Label:
while(true){
nextA1 = Platform.streamSearch( $ascin, ":A1:", nextA1 + 1 ); nextA1 = Platform.streamSearch( $ascin, ":A1:", nextA1 + 1 );
int end = nextA1 - 1; int end = nextA1 - 1;
if( end <= 0 ) if( end <= 0 )
...@@ -16,7 +18,10 @@ int splitMsgDTAInc() ...@@ -16,7 +18,10 @@ int splitMsgDTAInc()
start = nextA1; start = nextA1;
if( nextA1 > 0 ) if( nextA1 > 0 )
{ {
return MdaUtils.streamCount(this.getMsgctl()); // #######TODO 改写 LABEL与GOTO #### goto SearchNextA1 //return MdaUtils.streamCount(this.getMsgctl()); // #### goto SearchNextA1
continue SearchNextA1Label;
}
break SearchNextA1Label;
} }
return Platform.streamCount( $msgctl.getValue() ); return Platform.streamCount( $msgctl.getValue() );
......
...@@ -79,7 +79,8 @@ void printAllFldStream(boolean printfooterflag) ...@@ -79,7 +79,8 @@ void printAllFldStream(boolean printfooterflag)
// skip system tags // skip system tags
if( Platform.compareTo( format , "SYS" ) == 0 ) if( Platform.compareTo( format , "SYS" ) == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField //return ; // #### goto NextField
continue;
} }
// Load Content // Load Content
content = Platform.loadContent( orifieldname, $fldstream.getValue() ); content = Platform.loadContent( orifieldname, $fldstream.getValue() );
...@@ -251,7 +252,7 @@ void printAllFldStream(boolean printfooterflag) ...@@ -251,7 +252,7 @@ void printAllFldStream(boolean printfooterflag)
{ {
newline = true; newline = true;
} }
// #######TODO 改写 LABEL与GOTO #### label NextField // #### label NextField
} }
if( printfooterflag ) if( printfooterflag )
{ {
......
...@@ -80,7 +80,7 @@ void printAllTagsTCO(IStream docstream,String intitle,String indir,String incort ...@@ -80,7 +80,7 @@ void printAllTagsTCO(IStream docstream,String intitle,String indir,String incort
} }
break; break;
case "A": // Display all parts of ASCIN (handle multiple messages) case "A": // Display all parts of ASCIN (handle multiple messages)
// #######TODO 改写 LABEL与GOTO #### label LabelAllParts // #### label LabelAllParts
Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message
total = splitMsgDTAInc(); total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++) for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
...@@ -154,7 +154,68 @@ void printAllTagsTCO(IStream docstream,String intitle,String indir,String incort ...@@ -154,7 +154,68 @@ void printAllTagsTCO(IStream docstream,String intitle,String indir,String incort
if( Platform.errorCode() == -500 ) if( Platform.errorCode() == -500 )
{ {
// splitting is not possible (no :EOH:, TradeConnect message show complete message) // splitting is not possible (no :EOH:, TradeConnect message show complete message)
return ; // #######TODO 改写 LABEL与GOTO #### goto LabelAllParts //return ; // #### goto LabelAllParts
Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message
total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
{
if( total <= 1 )
{
// ASCIN contains single logical file
}
else
{
Platform.clear( $lastfilename );
line = Platform.getLine( $msgctl.getValue(), logicalFileIdx );
start = Platform.parseInt( Platform.mid( line, 1, 8 ) );
end = Platform.parseInt( Platform.mid( line, 9, 8 ) );
Platform.streamClear( $ascin.getValue() );
for(int i = start;i <= end;i++)
{
Platform.streamInsert( $ascin.getValue(), 0, Platform.getLine( msgstream, i ) );
}
// ASCIN contains logical file number `$LogicalFileIdx`
}
msgpos = 0;
do
{
msglen = -1;
Argument<Integer> msgposBox = new Argument<Integer>("",msgpos);
Argument<Integer> msglenBox = new Argument<Integer>("",msglen);
analyseSwiftStream( msgposBox, msglenBox, "SWT" );
msgpos = msgposBox.value;
msglen = msglenBox.value;
if( Platform.errorCode() > 0 )
{
msglen = 0;
}
else
{
if( msglen > 7 )
{
// Delete repetition of header for Tradeconnect/DTALC Trailer
// (Swift body fields are alway numeric)
zline = Platform.streamSearch( $namestream, "Z" );
if( zline > 1 )
{
if( Platform.compareTo( Platform.mid( Platform.getLine( $namestream.getValue(), zline - 1 ), 1, 1 ) , "A" ) == 0 )
{
for(int delidx = 1;delidx <= zline - 1;delidx++)
{
Platform.streamDelete( $namestream.getValue(), 1 );
}
}
}
if( ! Platform.isEmpty( $namestream ) )
{
}
msgpos = msgpos + msglen;
}
}
}while (!( msglen < 7 ));
}
} }
if( total > 1 ) if( total > 1 )
{ {
......
...@@ -79,7 +79,8 @@ void printAllFldStreamTCO(boolean printfooterflag) ...@@ -79,7 +79,8 @@ void printAllFldStreamTCO(boolean printfooterflag)
// skip system tags // skip system tags
if( Platform.compareTo( format , "SYS" ) == 0 ) if( Platform.compareTo( format , "SYS" ) == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField //return ; // #### goto NextField
continue;
} }
// Load Content // Load Content
content = Platform.loadContent( orifieldname, $fldstream.getValue() ); content = Platform.loadContent( orifieldname, $fldstream.getValue() );
...@@ -251,7 +252,7 @@ void printAllFldStreamTCO(boolean printfooterflag) ...@@ -251,7 +252,7 @@ void printAllFldStreamTCO(boolean printfooterflag)
{ {
newline = true; newline = true;
} }
// #######TODO 改写 LABEL与GOTO #### label NextField // #### label NextField
} }
if( printfooterflag ) if( printfooterflag )
{ {
......
...@@ -90,7 +90,7 @@ void printAllTagsTCO1() ...@@ -90,7 +90,7 @@ void printAllTagsTCO1()
} }
break; break;
case "A": // Display all parts of ASCIN (handle multiple messages) case "A": // Display all parts of ASCIN (handle multiple messages)
// #######TODO 改写 LABEL与GOTO #### label LabelAllParts // #### label LabelAllParts
Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message
total = splitMsgDTAInc(); total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++) for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
...@@ -167,7 +167,71 @@ void printAllTagsTCO1() ...@@ -167,7 +167,71 @@ void printAllTagsTCO1()
if( Platform.errorCode() == -500 ) if( Platform.errorCode() == -500 )
{ {
// splitting is not possible (no :EOH:, TradeConnect message show complete message) // splitting is not possible (no :EOH:, TradeConnect message show complete message)
return ; // #######TODO 改写 LABEL与GOTO #### goto LabelAllParts //return ; // #### goto LabelAllParts
Platform.streamSet( msgstream, $ascin.getValue() ); // for rest of message
total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
{
if( total <= 1 )
{
// ASCIN contains single logical file
}
else
{
Platform.clear( $lastfilename );
line = Platform.getLine( $msgctl.getValue(), logicalFileIdx );
start = Platform.parseInt( Platform.mid( line, 1, 8 ) );
end = Platform.parseInt( Platform.mid( line, 9, 8 ) );
Platform.streamClear( $ascin.getValue() );
for(int i = start;i <= end;i++)
{
Platform.streamInsert( $ascin.getValue(), 0, Platform.getLine( msgstream, i ) );
}
// ASCIN contains logical file number `$LogicalFileIdx`
}
msgpos = 0;
do
{
msglen = -1;
Argument<Integer> msgposBox = new Argument<Integer>("",msgpos);
Argument<Integer> msglenBox = new Argument<Integer>("",msglen);
analyseSwiftStream( msgposBox, msglenBox, $smh\cortyp.getValue() );
msgpos = msgposBox.value;
msglen = msglenBox.value;
if( Platform.errorCode() > 0 )
{
printLine( Platform.getText( #CT000411, $filename.getValue(), Platform.errorCode(), Platform.getErrorText() ) );
msglen = 0;
}
else
{
if( msglen > 7 )
{
// Delete repetition of header for Tradeconnect/DTALC Trailer
// (Swift body fields are alway numeric)
zline = Platform.streamSearch( $namestream, "Z" );
if( zline > 1 )
{
if( Platform.compareTo( Platform.mid( Platform.getLine( $namestream.getValue(), zline - 1 ), 1, 1 ) , "A" ) == 0 )
{
for(int delidx = 1;delidx <= zline - 1;delidx++)
{
Platform.streamDelete( $namestream.getValue(), 1 );
}
}
}
if( ! Platform.isEmpty( $namestream ) )
{
printAllFldStreamTCO( true );
printLine( " " );
}
msgpos = msgpos + msglen;
}
}
}while (!( msglen < 7 ));
}
} }
if( total > 1 ) if( total > 1 )
{ {
......
...@@ -54,7 +54,7 @@ void popupDocWithSMHben(#smh insmh,String intitle) ...@@ -54,7 +54,7 @@ void popupDocWithSMHben(#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( #CT000434, $filename.getValue(), Platform.getErrorText(), Platform.errorCode() ); Platform.message( #CT000434, $filename.getValue(), Platform.getErrorText(), Platform.errorCode() );
......
...@@ -321,7 +321,7 @@ BigDecimal clcFecIrtcal(#setfel line,String relcur,BigDecimal relamt,String feec ...@@ -321,7 +321,7 @@ BigDecimal clcFecIrtcal(#setfel line,String relcur,BigDecimal relamt,String feec
$$line\dat2 = Platform.add( $$line\dat2.getValue(), -1 ); $$line\dat2 = Platform.add( $$line\dat2.getValue(), -1 );
enddat = $$line\dat2; enddat = $$line\dat2;
//return ; // #### goto restart //return ; // #### goto restart
break restartLabel; continue restartLabel;
} }
// confirm usage of total minimum // confirm usage of total minimum
Platform.streamInsert( $$line\infdetstm.getValue(), 0, "MINCON" + "\t" + Platform.format( $$line\dat1.getValue(), "DD/MM/YYYY" ) + "\t" + Platform.format( $$line\dat2.getValue(), "DD/MM/YYYY" ) + "\t" + relcur + "\t" + Platform.toString( mintot ) ); Platform.streamInsert( $$line\infdetstm.getValue(), 0, "MINCON" + "\t" + Platform.format( $$line\dat1.getValue(), "DD/MM/YYYY" ) + "\t" + Platform.format( $$line\dat2.getValue(), "DD/MM/YYYY" ) + "\t" + relcur + "\t" + Platform.toString( mintot ) );
......
...@@ -7,19 +7,21 @@ void loadWrkPty(String argptyinr) ...@@ -7,19 +7,21 @@ void loadWrkPty(String argptyinr)
int cnt = 0; int cnt = 0;
if( ! Platform.isEmpty( res ) ) if( ! Platform.isEmpty( res ) )
{ {
// #######TODO 改写 LABEL与GOTO #### label restart // #### label restart
restartLabel:
while(true){
// check if more than 20 steps to avoid dead loop // check if more than 20 steps to avoid dead loop
cnt = cnt + 1; cnt = cnt + 1;
if( cnt > 20 ) if( cnt > 20 )
{ {
$\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, #CT000002, "GetFecPtyinrOFW" ); $\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, #CT000002, "GetFecPtyinrOFW" );
return ; // #######TODO 改写 LABEL与GOTO #### goto Done return ; // #### goto Done
} }
// get PTY // get PTY
Platform.cacheDbRead( $wrkpty, res, "INR" ); Platform.cacheDbRead( $wrkpty, res, "INR" );
if( Platform.errorCode() == tdOdbcNotFound ) if( Platform.errorCode() == tdOdbcNotFound )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto Done return ; // #### goto Done
} }
else else
{ {
...@@ -30,7 +32,8 @@ void loadWrkPty(String argptyinr) ...@@ -30,7 +32,8 @@ void loadWrkPty(String argptyinr)
if( ( ! Platform.isEmpty( $wrkpty\hbkconflg ) ) && ( ! Platform.isEmpty( $wrkpty\hbkinr ) ) && Platform.compareTo(res, $wrkpty\hbkinr.getValue()) != 0 ) if( ( ! Platform.isEmpty( $wrkpty\hbkconflg ) ) && ( ! Platform.isEmpty( $wrkpty\hbkinr ) ) && Platform.compareTo(res, $wrkpty\hbkinr.getValue()) != 0 )
{ {
res = $wrkpty\hbkinr; res = $wrkpty\hbkinr;
return ; // #######TODO 改写 LABEL与GOTO #### goto restart //return ; // #### goto restart
continue restartLabel;
} }
// check HEQACCFLG // check HEQACCFLG
// 可能會有自指的現象,需要考慮 // 可能會有自指的現象,需要考慮
...@@ -38,10 +41,13 @@ void loadWrkPty(String argptyinr) ...@@ -38,10 +41,13 @@ void loadWrkPty(String argptyinr)
if( ( ! Platform.isEmpty( $wrkpty\heqconflg ) ) && ( ! Platform.isEmpty( $wrkpty\heqinr ) ) && Platform.compareTo(res, $wrkpty\heqinr.getValue()) != 0 ) if( ( ! Platform.isEmpty( $wrkpty\heqconflg ) ) && ( ! Platform.isEmpty( $wrkpty\heqinr ) ) && Platform.compareTo(res, $wrkpty\heqinr.getValue()) != 0 )
{ {
res = $wrkpty\heqinr; res = $wrkpty\heqinr;
return ; // #######TODO 改写 LABEL与GOTO #### goto restart //return ; // #### goto restart
continue restartLabel;
} }
} }
break restartLabel;
}
} }
// #######TODO 改写 LABEL与GOTO #### label Done // #### label Done
} }
\ No newline at end of file
...@@ -94,6 +94,6 @@ void liaglesav(String cur,int amount,String engact,String engcat,String ref,Stri ...@@ -94,6 +94,6 @@ void liaglesav(String cur,int amount,String engact,String engcat,String ref,Stri
gleStoreEntry( $gle ); gleStoreEntry( $gle );
} }
} }
// #######TODO 改写 LABEL与GOTO #### label Endsav // #### label Endsav
} }
\ No newline at end of file
void gleStoreEntry(#gle entry) void gleStoreEntry(#gle entry)
{ {
dontsavLabel:
while(true){
if( Platform.compareTo( $$entry\amt , 0 ) == 0 && Platform.isEmpty( $$entry\act ) ) if( Platform.compareTo( $$entry\amt , 0 ) == 0 && Platform.isEmpty( $$entry\act ) )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto dontsav //return ; // #### goto dontsav
break dontsavLabel;
} }
if( Platform.isEmpty( $$entry\dbtcdt ) ) if( Platform.isEmpty( $$entry\dbtcdt ) )
{ {
Platform.sysDump( "D/C-Flag not set in Booking" ); Platform.sysDump( "D/C-Flag not set in Booking" );
return ; // #######TODO 改写 LABEL与GOTO #### goto dontsav //return ; // #### goto dontsav
break dontsavLabel;
} }
$$entry\trninr = $\trnmod\trn\inr; $$entry\trninr = $\trnmod\trn\inr;
if( Platform.errorCode() != 0 ) if( Platform.errorCode() != 0 )
{ {
Platform.sysDump( "Cannot get \\TRN\\INR" ); Platform.sysDump( "Cannot get \\TRN\\INR" );
Platform.clear( $$entry\trninr ); Platform.clear( $$entry\trninr );
return ; // #######TODO 改写 LABEL与GOTO #### goto dontsav //return ; // #### goto dontsav
break dontsavLabel;
} }
int order = $\trnmod\glenmb; int order = $\trnmod\glenmb;
$$entry\gleord = Platform.toString( order + 1 ); $$entry\gleord = Platform.toString( order + 1 );
...@@ -43,7 +48,9 @@ void gleStoreEntry(#gle entry) ...@@ -43,7 +48,9 @@ void gleStoreEntry(#gle entry)
$$entry\valdat = $$entry\bucdat; $$entry\valdat = $$entry\bucdat;
} }
Platform.saveData( entry, $glesrm.getValue(), "GLE" + Platform.toString( $glenmb.getValue(), -3 ) ); Platform.saveData( entry, $glesrm.getValue(), "GLE" + Platform.toString( $glenmb.getValue(), -3 ) );
// #######TODO 改写 LABEL与GOTO #### label dontsav break dontsavLabel;
}
// #### label dontsav
String line = $$entry\prn.getValue() + "\t" + $$entry\trninr.getValue() + "\t" + $$entry\dbtcdt.getValue() + "\t" + $$entry\cur.getValue() + "\t" + Platform.toString( $$entry\amt.getValue() ) + "\t" + Platform.fmtDateShort( $$entry\valdat.getValue(), Platform.getLang() ) + "\t" + $$entry\act.getValue() + "\t" + Platform.toString( $$entry\rat.getValue() ) + "\t" + $$entry\expses.getValue() + "\t" + $$entry\syscur.getValue() + "\t" + Platform.toString( $$entry\sysamt.getValue() ); String line = $$entry\prn.getValue() + "\t" + $$entry\trninr.getValue() + "\t" + $$entry\dbtcdt.getValue() + "\t" + $$entry\cur.getValue() + "\t" + Platform.toString( $$entry\amt.getValue() ) + "\t" + Platform.fmtDateShort( $$entry\valdat.getValue(), Platform.getLang() ) + "\t" + $$entry\act.getValue() + "\t" + Platform.toString( $$entry\rat.getValue() ) + "\t" + $$entry\expses.getValue() + "\t" + $$entry\syscur.getValue() + "\t" + Platform.toString( $$entry\sysamt.getValue() );
Platform.streamInsert( $gleshwstm.getValue(), 0, line ); Platform.streamInsert( $gleshwstm.getValue(), 0, line );
......
...@@ -35,7 +35,9 @@ void convertSwt(#trn argtrn,IStream swtstm) ...@@ -35,7 +35,9 @@ void convertSwt(#trn argtrn,IStream swtstm)
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
rc = "E"; rc = "E";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror //return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
} }
Platform.streamSet( $msgout.getValue(), $msgin.getValue() ); Platform.streamSet( $msgout.getValue(), $msgin.getValue() );
replaceFirstchar(); replaceFirstchar();
...@@ -48,24 +50,32 @@ void convertSwt(#trn argtrn,IStream swtstm) ...@@ -48,24 +50,32 @@ void convertSwt(#trn argtrn,IStream swtstm)
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
rc = "E"; rc = "E";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror //return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
} }
msgcount = $docimm.splitMsg( $msgout.getValue() ); msgcount = $docimm.splitMsg( $msgout.getValue() );
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
rc = "R"; rc = "R";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror //return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
} }
$docimm.splitMsgGetCtl( $msgctl.getValue() ); $docimm.splitMsgGetCtl( $msgctl.getValue() );
rc = transmitMessage( argtrn ); rc = transmitMessage( argtrn );
if( Platform.compareTo(rc, "D") != 0 ) if( Platform.compareTo(rc, "D") != 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror //return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
} }
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
rc = "E"; rc = "E";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror //return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
} }
Platform.streamInsert( swtstm, 0, $msgout.getValue() ); Platform.streamInsert( swtstm, 0, $msgout.getValue() );
} }
...@@ -77,7 +87,7 @@ void convertSwt(#trn argtrn,IStream swtstm) ...@@ -77,7 +87,7 @@ void convertSwt(#trn argtrn,IStream swtstm)
} }
} }
} }
// #######TODO 改写 LABEL与GOTO #### label doneerror // #### label doneerror
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
\ No newline at end of file
...@@ -4,11 +4,14 @@ void scanimage() ...@@ -4,11 +4,14 @@ void scanimage()
//>>>传递参数,根据参数调用影像接口 //>>>传递参数,根据参数调用影像接口
//<<<end //<<<end
String key = ""; String key = "";
scanLabel:
while(true){
if( Platform.compareTo( Platform.getTransName() , "OFFICE" ) == 0 ) if( Platform.compareTo( Platform.getTransName() , "OFFICE" ) == 0 )
{ {
//批量扫描 //批量扫描
key = " p "; key = " p ";
return ; // #######TODO 改写 LABEL与GOTO #### goto scan //return ; // #### goto scan
break scanLabel;
} }
//判断点击按钮是history image还是image //判断点击按钮是history image还是image
String block = Platform.getContext( "TRIGGER" ); String block = Platform.getContext( "TRIGGER" );
...@@ -61,7 +64,8 @@ void scanimage() ...@@ -61,7 +64,8 @@ void scanimage()
else else
{ {
key = " q " + $\sysmod\usr\extkey.getValue() + " " + "null" + " " + dCref; key = " q " + $\sysmod\usr\extkey.getValue() + " " + "null" + " " + dCref;
return ; // #######TODO 改写 LABEL与GOTO #### goto scan //return ; // #### goto scan
break scanLabel;
} }
} }
} }
...@@ -100,11 +104,14 @@ void scanimage() ...@@ -100,11 +104,14 @@ void scanimage()
Platform.exitEvent(); Platform.exitEvent();
} }
key = " d " + $\sysmod\usr\extkey.getValue() + " " + dCref + " " + dCinr + " " + "null" + " " + "null" + " " + Platform.trim( Platform.getTransName() ); key = " d " + $\sysmod\usr\extkey.getValue() + " " + dCref + " " + dCinr + " " + "null" + " " + "null" + " " + Platform.trim( Platform.getTransName() );
return ; // #######TODO 改写 LABEL与GOTO #### goto scan //return ; // #### goto scan
break scanLabel;
} }
} }
break scanLabel;
}
//release 交易单独处理 //release 交易单独处理
// #######TODO 改写 LABEL与GOTO #### label scan // #### label scan
if( ! Platform.isEmpty( key ) ) if( ! Platform.isEmpty( key ) )
{ {
// PromptOK( 'R0000052 // PromptOK( 'R0000052
......
...@@ -76,7 +76,7 @@ String getDcrefPart(String trn,String dcinr,Argument<String> pattyp) ...@@ -76,7 +76,7 @@ String getDcrefPart(String trn,String dcinr,Argument<String> pattyp)
} }
} }
} }
// #######TODO 改写 LABEL与GOTO #### label done // #### label done
return dcref; return dcref;
} }
\ No newline at end of file
...@@ -9,6 +9,8 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr) ...@@ -9,6 +9,8 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr)
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 // #######TODO 改写 LABEL与GOTO #### label CheckTarget
CheckTargetLabel:
while(true){
IStream str = new StreamImpl(); IStream str = new StreamImpl();
String msg = NULLSTR; String msg = NULLSTR;
if( Platform.ddeTestTopic( trigger, ddeTopic ) ) if( Platform.ddeTestTopic( trigger, ddeTopic ) )
...@@ -33,7 +35,8 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr) ...@@ -33,7 +35,8 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr)
Platform.pause( del ); Platform.pause( del );
tim = Platform.numAdd(tim , del); tim = Platform.numAdd(tim , del);
// $Del = $Del * 2 // $Del = $Del * 2
return ; // #######TODO 改写 LABEL与GOTO #### goto CheckTarget //return ; // #### goto CheckTarget
continue CheckTargetLabel;
} }
else else
{ {
...@@ -49,5 +52,6 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr) ...@@ -49,5 +52,6 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr)
} }
} }
} }
break CheckTargetLabel;
}
} }
\ No newline at end of file
...@@ -2,7 +2,7 @@ Date getNextPeriod(Date begdat,Date lastdate,String met) ...@@ -2,7 +2,7 @@ Date getNextPeriod(Date begdat,Date lastdate,String met)
{ {
//! retrieves next date //! retrieves next date
//! this function needs not to respect grace period, as this is respected on calling //! this function needs not to respect grace period, as this is respected on calling
// #######TODO 改写 LABEL与GOTO #### label nextdate // #### label nextdate
// generate next date // generate next date
int year = 0; int year = 0;
int month = 0; int month = 0;
......
...@@ -31,6 +31,8 @@ void registersettlementLiaZZ() ...@@ -31,6 +31,8 @@ void registersettlementLiaZZ()
{ {
roldbt = rolRpl; roldbt = rolRpl;
} }
SetFeeLabel:
while(true){
if( ( ! Platform.isEmpty( $\liaall\liaallg[i]\rol ) ) && ( ! Platform.isEmpty( $\liaall\liaallg[i]\feecod ) ) && Platform.isEmpty( $\liaall\liaallg[i]\feehndidx ) ) if( ( ! Platform.isEmpty( $\liaall\liaallg[i]\rol ) ) && ( ! Platform.isEmpty( $\liaall\liaallg[i]\feecod ) ) && Platform.isEmpty( $\liaall\liaallg[i]\feehndidx ) )
{ {
// check for special ddefinition with LiaallSetFeecodObj first // check for special ddefinition with LiaallSetFeecodObj first
...@@ -96,7 +98,8 @@ void registersettlementLiaZZ() ...@@ -96,7 +98,8 @@ void registersettlementLiaZZ()
if( ! Platform.isEmpty( wrn ) ) if( ! Platform.isEmpty( wrn ) )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto SetFee //return ; // #### goto SetFee
break SetFeeLabel;
} }
} }
} }
...@@ -136,7 +139,9 @@ void registersettlementLiaZZ() ...@@ -136,7 +139,9 @@ void registersettlementLiaZZ()
un = 0; un = 0;
} }
} }
// #######TODO 改写 LABEL与GOTO #### label SetFee break SetFeeLabel;
}
// #### label SetFee
/** /**
if \LIAALL\LIAALLG( $i )\fec\settyp == "E" and IsEmpty( \LIAALL\LIAALLG( $i )\setdatold ) then if \LIAALL\LIAALLG( $i )\fec\settyp == "E" and IsEmpty( \LIAALL\LIAALLG( $i )\setdatold ) then
$todat = NULLDATE $todat = NULLDATE
......
...@@ -14,10 +14,13 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg ...@@ -14,10 +14,13 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg
lstdat = dat2; lstdat = dat2;
dat2 = $\setmod\setfeg\fecism\irtcal.getNextPeriod ( begdat, dat2, $\liaall\liaallg[i]\fec\pertyp.getValue() ); dat2 = $\setmod\setfeg\fecism\irtcal.getNextPeriod ( begdat, dat2, $\liaall\liaallg[i]\fec\pertyp.getValue() );
} }
SetResLabel:
while(true){
if( dat2 == Platform.add( $\liaall\liaallg[i]\setdatold.getValue(), 1 ) ) if( dat2 == Platform.add( $\liaall\liaallg[i]\setdatold.getValue(), 1 ) )
{ {
begdat = lstdat; begdat = lstdat;
return ; // #######TODO 改写 LABEL与GOTO #### goto SetRes //return ; // #### goto SetRes
break SetResLabel;
} }
// If not, try to find relevant date from fee pool // If not, try to find relevant date from fee pool
IStream chkStm = new StreamImpl(); IStream chkStm = new StreamImpl();
...@@ -49,7 +52,8 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg ...@@ -49,7 +52,8 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg
{ {
todat = null; todat = null;
wrn = #CT000326; wrn = #CT000326;
return ; // #######TODO 改写 LABEL与GOTO #### goto SetRes //return ; // #### goto SetRes
break SetResLabel;
} }
else else
{ {
...@@ -63,7 +67,8 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg ...@@ -63,7 +67,8 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg
if( Platform.compareTo(Platform.toString( $liaallg[i]\fecold.getValue() ), Platform.toString( chkStm )) != 0 ) if( Platform.compareTo(Platform.toString( $liaallg[i]\fecold.getValue() ), Platform.toString( chkStm )) != 0 )
{ {
wrn = Platform.getText( #CT000327, $\liaall\liaallg[i]\feecod.getValue() ); wrn = Platform.getText( #CT000327, $\liaall\liaallg[i]\feecod.getValue() );
return ; // #######TODO 改写 LABEL与GOTO #### goto SetRes //return ; // #### goto SetRes
break SetResLabel;
} }
else else
{ {
...@@ -104,12 +109,15 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg ...@@ -104,12 +109,15 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg
if( ! Platform.isEmpty( fecBegdat ) ) if( ! Platform.isEmpty( fecBegdat ) )
{ {
wrn = Platform.getText( #CT000328, $\liaall\liaallg[i]\feecod.getValue() ); wrn = Platform.getText( #CT000328, $\liaall\liaallg[i]\feecod.getValue() );
return ; // #######TODO 改写 LABEL与GOTO #### goto SetRes //return ; // #### goto SetRes
break SetResLabel;
} }
} }
} }
} }
// #######TODO 改写 LABEL与GOTO #### label SetRes break SetResLabel;
}
// #### label SetRes
argbegdat.value = begdat; argbegdat.value = begdat;
argtodat.value = todat; argtodat.value = todat;
argwrn.value = wrn; argwrn.value = wrn;
......
...@@ -48,7 +48,9 @@ void getOldCovers(IModule mod) ...@@ -48,7 +48,9 @@ void getOldCovers(IModule mod)
mainmod = mod; mainmod = mod;
donflg = true; donflg = true;
} }
// #######TODO 改写 LABEL与GOTO #### label rep // #### label rep
repLabel:
while(true){
int chk = 1; int chk = 1;
String extid = NULLSTR; String extid = NULLSTR;
int use = 0; int use = 0;
...@@ -148,7 +150,10 @@ void getOldCovers(IModule mod) ...@@ -148,7 +150,10 @@ void getOldCovers(IModule mod)
Platform.streamClear( ids ); Platform.streamClear( ids );
Platform.streamInsert( ids, 0, Platform.getLine( addids, 1 ) ); Platform.streamInsert( ids, 0, Platform.getLine( addids, 1 ) );
Platform.streamDelete( addids, 1 ); Platform.streamDelete( addids, 1 );
return ; // #######TODO 改写 LABEL与GOTO #### goto rep //return ; // #### goto rep
continue repLabel;
}
break repLabel;
} }
// reset old amount in lines not longer holding an amount // reset old amount in lines not longer holding an amount
int stmCntOld = Platform.streamCount( oldIdxStm ); int stmCntOld = Platform.streamCount( oldIdxStm );
......
...@@ -4,16 +4,21 @@ event $add order 1000 ...@@ -4,16 +4,21 @@ event $add order 1000
int num = Platform.gridCount( $liaccvg ); int num = Platform.gridCount( $liaccvg );
int idx = 1; int idx = 1;
String insflg = "Y"; String insflg = "Y";
chooseCcvLabel:
while(true){
for(int line = 1;line <= num;line++) for(int line = 1;line <= num;line++)
{ {
if( Platform.isEmpty( $liaccvg[line]\oldamt ) && Platform.isEmpty( $liaccvg[line]\amt ) && Platform.isEmpty( $liaccvg[line]\ownref ) && Platform.isEmpty( $liaccvg[line]\acc ) ) if( Platform.isEmpty( $liaccvg[line]\oldamt ) && Platform.isEmpty( $liaccvg[line]\amt ) && Platform.isEmpty( $liaccvg[line]\ownref ) && Platform.isEmpty( $liaccvg[line]\acc ) )
{ {
idx = line; idx = line;
insflg = "N"; insflg = "N";
return ; // #######TODO 改写 LABEL与GOTO #### goto chooseCcv //return ; // #### goto chooseCcv
break chooseCcvLabel;
} }
} }
// #######TODO 改写 LABEL与GOTO #### label chooseCcv break chooseCcvLabel;
}
// #### label chooseCcv
if( Platform.compareTo( insflg , "Y" ) == 0 ) if( Platform.compareTo( insflg , "Y" ) == 0 )
{ {
Platform.gridInsertRow( $liaccvg, 0 ); Platform.gridInsertRow( $liaccvg, 0 );
......
...@@ -7,19 +7,19 @@ default $cbe\acc order 1000 ...@@ -7,19 +7,19 @@ default $cbe\acc order 1000
Platform.disable( $cbe\acc ); Platform.disable( $cbe\acc );
Platform.setFieldValue( $cbe\acc, $wrkcbe\acc ); Platform.setFieldValue( $cbe\acc, $wrkcbe\acc );
$cbe\acc = $wrkcbe\acc.getValue(); $cbe\acc = $wrkcbe\acc.getValue();
return ; // #######TODO 改写 LABEL与GOTO #### goto done return ; // #### goto done
} }
if( Platform.isEmpty( $cbe\cur ) ) if( Platform.isEmpty( $cbe\cur ) )
{ {
Platform.disable( $cbe\acc ); Platform.disable( $cbe\acc );
Platform.setFieldValue( $cbe\acc, $cbe\acc ); Platform.setFieldValue( $cbe\acc, $cbe\acc );
return ; // #######TODO 改写 LABEL与GOTO #### goto done return ; // #### goto done
} }
if( ( Platform.isEmpty( $liaptyinr ) || ( Platform.compareTo( $cbe\amt , 0 ) == 0 ) ) && ( Platform.compareTo( $wrkcbb\amt , 0 ) == 0 ) ) if( ( Platform.isEmpty( $liaptyinr ) || ( Platform.compareTo( $cbe\amt , 0 ) == 0 ) ) && ( Platform.compareTo( $wrkcbb\amt , 0 ) == 0 ) )
{ {
Platform.disable( $cbe\acc ); Platform.disable( $cbe\acc );
Platform.setFieldValue( $cbe\acc, $cbe\acc ); Platform.setFieldValue( $cbe\acc, $cbe\acc );
return ; // #######TODO 改写 LABEL与GOTO #### goto done return ; // #### goto done
} }
else else
{ {
...@@ -51,6 +51,6 @@ default $cbe\acc order 1000 ...@@ -51,6 +51,6 @@ default $cbe\acc order 1000
{ {
Platform.disable( $cbe\acc ); Platform.disable( $cbe\acc );
} }
// #######TODO 改写 LABEL与GOTO #### label done // #### label done
} }
\ No newline at end of file
...@@ -5,18 +5,18 @@ default $cbe\acc2 order 1000 ...@@ -5,18 +5,18 @@ default $cbe\acc2 order 1000
{ {
Platform.disable( $cbe\acc2 ); Platform.disable( $cbe\acc2 );
$cbe\acc2 = $wrkcbe\acc2.getValue(); $cbe\acc2 = $wrkcbe\acc2.getValue();
return ; // #######TODO 改写 LABEL与GOTO #### goto done return ; // #### goto done
} }
if( Platform.isEmpty( $cbe\cur ) || ! Platform.isEmpty( $nobookcat ) ) if( Platform.isEmpty( $cbe\cur ) || ! Platform.isEmpty( $nobookcat ) )
{ {
$\sysmod.disableAndClearField( Platform.getDatafield($cbe,"acc2") ); $\sysmod.disableAndClearField( Platform.getDatafield($cbe,"acc2") );
return ; // #######TODO 改写 LABEL与GOTO #### goto done return ; // #### goto done
} }
String trmtyp = NULLSTR; String trmtyp = NULLSTR;
if( ( Platform.isEmpty( $liaacc2ptyinr ) || ( Platform.compareTo( $cbe\amt , 0 ) == 0 ) ) && ( Platform.compareTo( $wrkcbb\amt , 0 ) == 0 ) ) if( ( Platform.isEmpty( $liaacc2ptyinr ) || ( Platform.compareTo( $cbe\amt , 0 ) == 0 ) ) && ( Platform.compareTo( $wrkcbb\amt , 0 ) == 0 ) )
{ {
Platform.disable( $cbe\acc2 ); Platform.disable( $cbe\acc2 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done return ; // #### goto done
} }
else else
{ {
...@@ -60,6 +60,6 @@ default $cbe\acc2 order 1000 ...@@ -60,6 +60,6 @@ default $cbe\acc2 order 1000
{ {
Platform.disable( $cbe\acc2 ); Platform.disable( $cbe\acc2 );
} }
// #######TODO 改写 LABEL与GOTO #### label done // #### label done
} }
\ No newline at end of file
...@@ -15,8 +15,10 @@ void lscReevaluateLsbBalance(String lsbinr) ...@@ -15,8 +15,10 @@ void lscReevaluateLsbBalance(String lsbinr)
// clear register to accumulate balance // clear register to accumulate balance
BigDecimal amt = new BigDecimal("0"); BigDecimal amt = new BigDecimal("0");
$lsa\xrfdat = Platform.today(); $lsa\xrfdat = Platform.today();
// #######TODO 改写 LABEL与GOTO #### label LSCLoop // #### label LSCLoop
// Loop thru LSC"s, convert to LSB\CUR and sum together // Loop thru LSC"s, convert to LSB\CUR and sum together
LSCLoopLabel:
while(true){
Platform.DBFetch( $lsc ); Platform.DBFetch( $lsc );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
...@@ -26,7 +28,8 @@ void lscReevaluateLsbBalance(String lsbinr) ...@@ -26,7 +28,8 @@ void lscReevaluateLsbBalance(String lsbinr)
$lsc\xrfamt = Platform.xrtLimit( $lsc\cur.getValue(), $lsc\amt.getValue(), $lsc\xrfcur.getValue(), $lsc\xrfdat.getValue() ); $lsc\xrfamt = Platform.xrtLimit( $lsc\cur.getValue(), $lsc\amt.getValue(), $lsc\xrfcur.getValue(), $lsc\xrfdat.getValue() );
Platform.dbUpdate( $lsc, $lsc\lsbinr.getValue(), "LSBINR", $lsc\cur.getValue(), "CUR" ); Platform.dbUpdate( $lsc, $lsc\lsbinr.getValue(), "LSBINR", $lsc\cur.getValue(), "CUR" );
amt = Platform.numAdd(amt , $lsc\xrfamt.getValue()); amt = Platform.numAdd(amt , $lsc\xrfamt.getValue());
return ; // #######TODO 改写 LABEL与GOTO #### goto LSCLoop //return ; // #### goto LSCLoop
continue LSCLoopLabel;
} }
else else
{ {
...@@ -35,6 +38,8 @@ void lscReevaluateLsbBalance(String lsbinr) ...@@ -35,6 +38,8 @@ void lscReevaluateLsbBalance(String lsbinr)
Platform.reraise(); Platform.reraise();
} }
} }
break LSCLoopLabel;
}
$lsa\useamt = amt; $lsa\useamt = amt;
// Update LSA // Update LSA
Platform.sdbUpdate( $lsa ); Platform.sdbUpdate( $lsa );
......
...@@ -13,7 +13,9 @@ String lscCheckTrnAccepted(String argtrninr) ...@@ -13,7 +13,9 @@ String lscCheckTrnAccepted(String argtrninr)
String rtn = ""; String rtn = "";
// build a list of all existing LSMFLG`s of the Transaction // build a list of all existing LSMFLG`s of the Transaction
Platform.dbExecuteSQL( "Select LSMFLG from LSM where TRNINR = ? group by LSMFLG", argtrninr ); Platform.dbExecuteSQL( "Select LSMFLG from LSM where TRNINR = ? group by LSMFLG", argtrninr );
// #######TODO 改写 LABEL与GOTO #### label NextLsm // #### label NextLsm
NextLsmLabel:
while(true){
Platform.dbFetchFields( "", lsmFlg ); Platform.dbFetchFields( "", lsmFlg );
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
...@@ -23,8 +25,9 @@ String lscCheckTrnAccepted(String argtrninr) ...@@ -23,8 +25,9 @@ String lscCheckTrnAccepted(String argtrninr)
case "O": case "O":
case "A": case "A":
rtn = LscAccepted; rtn = LscAccepted;
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextLsm //return ; // #### goto NextLsm
break; continue NextLsmLabel;
//break;
case "R": case "R":
rtn = LscRejected; rtn = LscRejected;
break; break;
...@@ -32,6 +35,8 @@ String lscCheckTrnAccepted(String argtrninr) ...@@ -32,6 +35,8 @@ String lscCheckTrnAccepted(String argtrninr)
rtn = LscPending; rtn = LscPending;
} }
} }
break NextLsmLabel;
}
Platform.dbCloseCursor(); Platform.dbCloseCursor();
return rtn; return rtn;
......
...@@ -14,7 +14,11 @@ void getObjInf(IModule argobj,Argument<String> bussec,Argument<String> ptyinr,Ar ...@@ -14,7 +14,11 @@ void getObjInf(IModule argobj,Argument<String> bussec,Argument<String> ptyinr,Ar
{ {
bussec.value = Platform.mid( Platform.getContent( conPth + "\\PTS\\OBJTYP" ), 1, 2 ); bussec.value = Platform.mid( Platform.getContent( conPth + "\\PTS\\OBJTYP" ), 1, 2 );
ptyPth = conPth + "\\PTY"; ptyPth = conPth + "\\PTY";
return ; // #######TODO 改写 LABEL与GOTO #### goto GetPtyDta //return ; // #### goto GetPtyDta
ptyinr.value = Platform.getContent( ptyPth + "\\INR" );
heqinr.value = Platform.getContent( ptyPth + "\\HEQINR" );
ctycod.value = Platform.getContent( ptyPth + "\\RSKCTY" );
return;
} }
bussec.value = objTyp; bussec.value = objTyp;
// Now determine the relevant PTY // Now determine the relevant PTY
...@@ -91,7 +95,7 @@ void getObjInf(IModule argobj,Argument<String> bussec,Argument<String> ptyinr,Ar ...@@ -91,7 +95,7 @@ void getObjInf(IModule argobj,Argument<String> bussec,Argument<String> ptyinr,Ar
// has to exist // has to exist
ptyPth = Platform.getModuleInfo( $pty, tdModuleInfoFullName ); ptyPth = Platform.getModuleInfo( $pty, tdModuleInfoFullName );
} }
// #######TODO 改写 LABEL与GOTO #### label GetPtyDta // #### label GetPtyDta
ptyinr.value = Platform.getContent( ptyPth + "\\INR" ); ptyinr.value = Platform.getContent( ptyPth + "\\INR" );
heqinr.value = Platform.getContent( ptyPth + "\\HEQINR" ); heqinr.value = Platform.getContent( ptyPth + "\\HEQINR" );
ctycod.value = Platform.getContent( ptyPth + "\\RSKCTY" ); ctycod.value = Platform.getContent( ptyPth + "\\RSKCTY" );
......
...@@ -10,19 +10,45 @@ void lsiProcessCbeEntry(#cbe argcbe,IModule arggrp) ...@@ -10,19 +10,45 @@ void lsiProcessCbeEntry(#cbe argcbe,IModule arggrp)
String lsrLst = mapCbt2Lst( argcbe, arggrp ); String lsrLst = mapCbt2Lst( argcbe, arggrp );
// Read or initialize the LSR to be used // Read or initialize the LSR to be used
Platform.lscReadLsrForCbe( $lsr, argcbe, lsrLst ); Platform.lscReadLsrForCbe( $lsr, argcbe, lsrLst );
boolean TopENGINFlag = true;
if( Platform.compareTo( Platform.mid( $$argcbe\cbt.getValue(), 4, 3 ) , "IN " ) == 0 ) if( Platform.compareTo( Platform.mid( $$argcbe\cbt.getValue(), 4, 3 ) , "IN " ) == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto TopENGIN //return ; // #### goto TopENGIN
} }
else else
{ {
if( Platform.compareTo( Platform.mid( $$argcbe\cbt.getValue(), 4, 3 ) , "OUT" ) == 0 ) if( Platform.compareTo( Platform.mid( $$argcbe\cbt.getValue(), 4, 3 ) , "OUT" ) == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto TopENGout //return ; // #### goto TopENGout
if( Platform.isEmpty( $lsr\inr ) )
{
if(1==1) return;
}
// Create LSM Entry
lscCreateLsmForLsr( $lsm, $lsr, argcbe, "O" );
IStream lsbInrStm = new StreamImpl();
Platform.streamClear( lsbInrStm );
lscGetAllLsbForLsr( lsbInrStm, $lsr\inr.getValue() );
int lsbMax = Platform.streamCount( lsbInrStm );
String lsbInr = NULLSTR;
String lssFlg;
for(int lsbIdx = 1;lsbIdx <= lsbMax;lsbIdx++)
{
lsbInr = Platform.getLine( lsbInrStm, lsbIdx );
lssFlg = LscAccepted;
Argument<String> lssFlgBox = new Argument<String>("",lssFlg);
lscHandleLssFlg( $lsm, lsbInr, lssFlgBox, "A" );
lssFlg = lssFlgBox.value;
}
Platform.lscUpdateLsmCommit( $lsm );
// End of ENGout
if(1==1) return;
} }
} }
// Handling of ENGIN // Handling of ENGIN
// #######TODO 改写 LABEL与GOTO #### label TopENGIN // #### label TopENGIN
// Create new request (when contract has no request) // Create new request (when contract has no request)
if( Platform.isEmpty( $lsr\inr ) ) if( Platform.isEmpty( $lsr\inr ) )
{ {
...@@ -46,7 +72,7 @@ void lsiProcessCbeEntry(#cbe argcbe,IModule arggrp) ...@@ -46,7 +72,7 @@ void lsiProcessCbeEntry(#cbe argcbe,IModule arggrp)
if(1==1) return; if(1==1) return;
//-------------------------------------------------------- //--------------------------------------------------------
// Handling of ENGout // Handling of ENGout
// #######TODO 改写 LABEL与GOTO #### label TopENGout // #### label TopENGout
// no handling when no request exists // no handling when no request exists
if( Platform.isEmpty( $lsr\inr ) ) if( Platform.isEmpty( $lsr\inr ) )
{ {
......
...@@ -17,7 +17,7 @@ String lsnCheckTrnAccepted(String argtrninr) ...@@ -17,7 +17,7 @@ String lsnCheckTrnAccepted(String argtrninr)
case "A": case "A":
rtn = LscAccepted; rtn = LscAccepted;
//return ; // #### goto NextLne //return ; // #### goto NextLne
break NextLneLabel; continue NextLneLabel;
case "R": case "R":
rtn = LscRejected; rtn = LscRejected;
break; break;
......
...@@ -72,7 +72,9 @@ event $sav order 200 ...@@ -72,7 +72,9 @@ event $sav order 200
warFlg = true; warFlg = true;
if( ! Platform.isEmpty( aurflg ) && Platform.compareTo( $\sysmod\ssn\bckgrd , "B" ) == 0 ) if( ! Platform.isEmpty( aurflg ) && Platform.compareTo( $\sysmod\ssn\bckgrd , "B" ) == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto skipLabel //SYSWRN\IDS的值存在多种情况,后续优化 //return ; // #### goto skipLabel //SYSWRN\IDS的值存在多种情况,后续优化
$\trnmod.init200();
$\trnmod\trnism.wfmInitNewEntry();
} }
/** /**
if not IsEmpty( $aurflg ) and \SYSMOD\SSN\BCKGRD == "B" then if not IsEmpty( $aurflg ) and \SYSMOD\SSN\BCKGRD == "B" then
...@@ -98,7 +100,7 @@ event $sav order 200 ...@@ -98,7 +100,7 @@ event $sav order 200
Platform.exitEvent(); Platform.exitEvent();
} }
} }
// #######TODO 改写 LABEL与GOTO #### label skipLabel // #### label skipLabel
// initialize workflow entries, if not recalculation // initialize workflow entries, if not recalculation
$\trnmod.init200(); $\trnmod.init200();
$\trnmod\trnism.wfmInitNewEntry(); $\trnmod\trnism.wfmInitNewEntry();
......
...@@ -18,11 +18,15 @@ void checkOpenIssues(IModule arggrp) ...@@ -18,11 +18,15 @@ void checkOpenIssues(IModule arggrp)
int dummy = $syswrn.sysWarningGroupRemove( "", sysWrnPfx ); int dummy = $syswrn.sysWarningGroupRemove( "", sysWrnPfx );
if( Platform.recIsEmptyInr( arggrp ) ) if( Platform.recIsEmptyInr( arggrp ) )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitOfRoutine //return ; // #### goto ExitOfRoutine
$syswrn.sysWarningGroupCompleted();
return;
} }
if( Platform.compareTo( $clsflg.getValue() , "O" ) == 0 ) if( Platform.compareTo( $clsflg.getValue() , "O" ) == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitOfRoutine //return ; // #### goto ExitOfRoutine
$syswrn.sysWarningGroupCompleted();
return;
} }
// get subcontracts from database if not already read // get subcontracts from database if not already read
int hardLinkCnt = 0; int hardLinkCnt = 0;
...@@ -58,7 +62,7 @@ void checkOpenIssues(IModule arggrp) ...@@ -58,7 +62,7 @@ void checkOpenIssues(IModule arggrp)
linHardNr = Platform.streamSearch( $cfginf\chiconnectstm, "H" ); linHardNr = Platform.streamSearch( $cfginf\chiconnectstm, "H" );
if( linHardNr == 0 ) if( linHardNr == 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto LblCheckSoftLinks //return ; // #### goto LblCheckSoftLinks
} }
else else
{ {
...@@ -82,7 +86,7 @@ void checkOpenIssues(IModule arggrp) ...@@ -82,7 +86,7 @@ void checkOpenIssues(IModule arggrp)
Platform.dbFetchFields( "", hardLinkCnt ); Platform.dbFetchFields( "", hardLinkCnt );
Platform.dbCloseCursor(); Platform.dbCloseCursor();
} }
// #######TODO 改写 LABEL与GOTO #### label LblCheckSoftLinks // #### label LblCheckSoftLinks
for(int i = 1;i <= subConCnt;i++) for(int i = 1;i <= subConCnt;i++)
{ {
connectTyp = Platform.getLine( $cfginf\chiconnectstm.getValue(), i ); connectTyp = Platform.getLine( $cfginf\chiconnectstm.getValue(), i );
...@@ -319,7 +323,7 @@ void checkOpenIssues(IModule arggrp) ...@@ -319,7 +323,7 @@ void checkOpenIssues(IModule arggrp)
{ {
$syswrn.sysWarningSet( SYSWRNTypeWarning, #CT000165, sysWrnPfx + "SPTOPNCNT" ); $syswrn.sysWarningSet( SYSWRNTypeWarning, #CT000165, sysWrnPfx + "SPTOPNCNT" );
} }
// #######TODO 改写 LABEL与GOTO #### label ExitOfRoutine // #### label ExitOfRoutine
// restore the already read status of the (re)created warning entries // restore the already read status of the (re)created warning entries
$syswrn.sysWarningGroupCompleted(); $syswrn.sysWarningGroupCompleted();
......
...@@ -7,9 +7,12 @@ void checkusrspt() ...@@ -7,9 +7,12 @@ void checkusrspt()
} }
// Load last pending item of the current user even if the SPT was in a changed to entity // Load last pending item of the current user even if the SPT was in a changed to entity
Platform.dbRead( $\sysmod\spt, "WHERE STA = ? AND OWNUSR = ? ORDER BY INR DESC", SptAfterBreak, $\sysmod\usr\extkey.getValue() ); Platform.dbRead( $\sysmod\spt, "WHERE STA = ? AND OWNUSR = ? ORDER BY INR DESC", SptAfterBreak, $\sysmod\usr\extkey.getValue() );
NoAbortFoundLabel:
while(true){
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound //return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
} }
// Load the session of the SPT // Load the session of the SPT
String ssnSta = ""; String ssnSta = "";
...@@ -20,17 +23,20 @@ void checkusrspt() ...@@ -20,17 +23,20 @@ void checkusrspt()
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound //return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
} }
// check whether the SSN of the SPT is an aborted session and the last transaction was the transaction of the SPT // check whether the SSN of the SPT is an aborted session and the last transaction was the transaction of the SPT
if( ( Platform.compareTo(ssnSta, "C") != 0 && Platform.compareTo(ssnSta, "R") != 0 ) || Platform.compareTo($\sysmod\spt\frm.getValue(), ssnFrm) != 0 ) if( ( Platform.compareTo(ssnSta, "C") != 0 && Platform.compareTo(ssnSta, "R") != 0 ) || Platform.compareTo($\sysmod\spt\frm.getValue(), ssnFrm) != 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound //return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
} }
// The checking of date and time of the last transaction of the SSN against the SPT date and time // The checking of date and time of the last transaction of the SSN against the SPT date and time
if( Platform.diff($\sysmod\spt\dattim.getValue() , ssnDattim)<0 ) if( Platform.diff($\sysmod\spt\dattim.getValue() , ssnDattim)<0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound //return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
} }
int ssnCnt = 0; int ssnCnt = 0;
// check whether found session is the last session // check whether found session is the last session
...@@ -39,11 +45,13 @@ void checkusrspt() ...@@ -39,11 +45,13 @@ void checkusrspt()
Platform.dbCloseCursor(); Platform.dbCloseCursor();
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound //return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
} }
if( ssnCnt > 0 ) if( ssnCnt > 0 )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound //return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
} }
boolean que = Platform.prompt( #CT000024, $\sysmod\spt\dattim.getValue() ); boolean que = Platform.prompt( #CT000024, $\sysmod\spt\dattim.getValue() );
String sptEty = NULLSTR; String sptEty = NULLSTR;
...@@ -67,7 +75,8 @@ void checkusrspt() ...@@ -67,7 +75,8 @@ void checkusrspt()
{ {
Platform.message( #CT000027, sptEty ); Platform.message( #CT000027, sptEty );
Platform.dbFree( $\sysmod\spt ); Platform.dbFree( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound //return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
} }
} }
} }
...@@ -79,7 +88,9 @@ void checkusrspt() ...@@ -79,7 +88,9 @@ void checkusrspt()
Platform.dbFree( $\sysmod\spt ); Platform.dbFree( $\sysmod\spt );
} }
} }
// #######TODO 改写 LABEL与GOTO #### label NoAbortFound break NoAbortFoundLabel;
}
// #### label NoAbortFound
Platform.clear( $\sysmod\spt ); Platform.clear( $\sysmod\spt );
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
......
...@@ -4,7 +4,7 @@ void ptsRolesAdjust(IModule argmod,IStream stm) ...@@ -4,7 +4,7 @@ void ptsRolesAdjust(IModule argmod,IStream stm)
//! These may remove roles not allowed for contract Argmod using PtsRemoveRol //! These may remove roles not allowed for contract Argmod using PtsRemoveRol
//! Or disallow changes of roles using PtsSetRolChgFlg //! Or disallow changes of roles using PtsSetRolChgFlg
boolean retry = false; boolean retry = false;
// #######TODO 改写 LABEL与GOTO #### label Restart // #### label Restart
// Inititalize RolChgFlg for all roles // Inititalize RolChgFlg for all roles
int max = Platform.streamCount( stm ); int max = Platform.streamCount( stm );
for(int i = 1;i <= max;i++) for(int i = 1;i <= max;i++)
......
...@@ -9,13 +9,18 @@ void deleteSet(IModule rec,String sqlarg) ...@@ -9,13 +9,18 @@ void deleteSet(IModule rec,String sqlarg)
//! The entries to be deleted are selected and entrywise //! The entries to be deleted are selected and entrywise
//! locked and then deleted. //! locked and then deleted.
Platform.dbSelectCursor( rec, sqlarg ); Platform.dbSelectCursor( rec, sqlarg );
// #######TODO 改写 LABEL与GOTO #### label DelLoop // #### label DelLoop
DelLoopLabel:
while(true){
Platform.DBFetch( rec ); Platform.DBFetch( rec );
if( Platform.errorCode() != tdOdbcNotFound ) if( Platform.errorCode() != tdOdbcNotFound )
{ {
Platform.reraise(); Platform.reraise();
Platform.sdbDelete( rec ); Platform.sdbDelete( rec );
return ; // #######TODO 改写 LABEL与GOTO #### goto DelLoop //return ; // #### goto DelLoop
continue DelLoopLabel;
}
break DelLoopLabel;
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
......
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