Commit 2f67ac06 by wangguangchao

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

parent fbc65b7d
......@@ -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() ) )
{
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
arggroup.value = $atcsub\atcdia\grp;
......@@ -30,7 +30,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
break;
default:
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), "Function not defined" );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
break;
......@@ -40,7 +40,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
break;
......@@ -50,7 +50,7 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DAT", $atcsub\atcdia\dat.getValue(), errTxt );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
break;
......@@ -62,14 +62,14 @@ void getNextEntryForDIA(Argument<String> argcodes,Argument<String> arggroup,Argu
{
errTxt = Platform.getErrorText();
atcCallSysdumpInfo( "ATCDIA\\DATNUM", Platform.toString( $atcsub\atcdia\datnum.getValue() ), errTxt );
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
}
// no creation of diary, if date empty
if( Platform.isEmpty( argdate.value ) )
{
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextEntry
//return ; // #### goto NextEntry
continue NextEntryLabel;
}
argcod.value = $atcsub\atcdia\cod;
......
......@@ -12,7 +12,9 @@ String cbsGetUnbalancedExtIds(IModule obj,String cbcarg)
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";
Platform.dbSelectCursor( $cbb, sql );
// #######TODO 改写 LABEL与GOTO #### label CBBLoop
// #### label CBBLoop
CBBLoopLabel:
while(true){
Platform.DBFetch( $cbb );
while( Platform.errorCode() <= 0 )
{
......@@ -38,13 +40,16 @@ String cbsGetUnbalancedExtIds(IModule obj,String cbcarg)
}
lastId = $cbb\extid;
}
continue ; // #######TODO 改写 LABEL与GOTO #### goto CBBLoop
//continue ; // #### goto CBBLoop
continue CBBLoopLabel;
}
break CBBLoopLabel;
}
if( ! Platform.isEmpty( emptyId ) )
{
extIds = "\r\n" + extIds;
}
// #######TODO 改写 LABEL与GOTO #### label CBBDone
// #### label CBBDone
return extIds;
}
\ No newline at end of file
......@@ -13,7 +13,9 @@ String internalGenSqlSet(String argliste)
String rtn = NULLSTR;
IStream argstm = new StreamImpl();
Platform.streamClear( argstm );
// #######TODO 改写 LABEL与GOTO #### label NxtElm
// #### label NxtElm
NxtElmLabel:
while(true){
// Search for next delimiter
while(begPos <= MdaUtilsEx.len(argliste)) {
int len = Platform.pos( Platform.mid( argliste, begPos ), "," );
......@@ -24,7 +26,7 @@ String internalGenSqlSet(String argliste)
if( begPos == 1 )
{
rtn = " = " + Platform.sqlLit( argliste );
return rtn; // #######TODO 改写 LABEL与GOTO #### goto Done
return rtn; // #### goto Done
}
// if no delimiter found, take rest
len = Platform.len( Platform.mid( argliste, begPos ) ) + 1;
......@@ -43,10 +45,13 @@ String internalGenSqlSet(String argliste)
begPos = begPos + len;
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
String list = "";
String con = "";
......@@ -57,7 +62,7 @@ String internalGenSqlSet(String argliste)
con = ",";
}
rtn = " IN (" + list + ")";
// #######TODO 改写 LABEL与GOTO #### label Done
// #### label Done
return rtn;
}
\ No newline at end of file
......@@ -26,7 +26,9 @@ void createCbbEntries(#cbe rec)
}
// Insert CBB-records for all relevant CBC-s depending on CBT
int idx = 1;
// #######TODO 改写 LABEL与GOTO #### label CBBLoop
// #### label CBBLoop
CBBLoopLabel:
while(true){
String blk = Platform.getLine( cbcBlk, idx );
if( Platform.isEmpty( blk ) )
{
......@@ -73,6 +75,8 @@ void createCbbEntries(#cbe rec)
Platform.reraise();
}
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)
}
}
int idx = 0;
// #######TODO 改写 LABEL与GOTO #### label DelLoop
// #### label DelLoop
DelLoopLabel:
while(true){
idx = idx + 1;
if( idx > Platform.streamCount( stream ) )
{
......@@ -78,6 +80,8 @@ void deleteCbbEntries(#cbe cbearg)
// Delete the CBS-Balance entry
Platform.dbRead( $\cbsmod\cbb, inr, "INR" );
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)
}
}
int idx = 0;
// #######TODO 改写 LABEL与GOTO #### label UpdLoop
// #### label UpdLoop
UpdLoopLabel:
while(true){
idx = idx + 1;
if( idx > Platform.streamCount( stream ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto UpdDone
return ; // #### goto UpdDone
}
lin = Platform.getLine( stream, idx );
opr = Platform.mid( lin, 1, 1 );
......@@ -87,7 +89,9 @@ void commitCbbEntries(#cbe cbearg)
{
Platform.reraise();
}
return ; // #######TODO 改写 LABEL与GOTO #### goto UpdLoop
// #######TODO 改写 LABEL与GOTO #### label UpdDone
//return ; // #### goto UpdLoop
continue UpdLoopLabel;
}
// #### label UpdDone
}
\ No newline at end of file
......@@ -27,7 +27,7 @@ void saveConDataAndCallTrn(String argtrn)
if( !que )
{
Platform.clear( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd
return ; // #### goto LblEnd
}
}
else
......@@ -43,7 +43,7 @@ void saveConDataAndCallTrn(String argtrn)
{
Platform.message( #CT000027, sptEty );
Platform.dbFree( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd
return ; // #### goto LblEnd
}
}
}
......@@ -53,7 +53,7 @@ void saveConDataAndCallTrn(String argtrn)
}
Platform.message( #CT000026, $\sysmod\spt\frm.getValue() );
Platform.dbFree( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd
return ; // #### goto LblEnd
}
}
}
......@@ -69,6 +69,6 @@ void saveConDataAndCallTrn(String argtrn)
Platform.clear( $\sysmod\spt );
saveConData();
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)
{
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
{
......@@ -40,7 +58,7 @@ void printAddressBlk(String user,String charArg,String user1)
}
else
{
// #######TODO 改写 LABEL与GOTO #### label this
// #### label this
if( ! Platform.isEmpty( Platform.getContent( user1 + "\\ADRBLK" ) ) )
{
for(int i = 1;i <= 4;i++)
......
......@@ -35,7 +35,9 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm)
if( Platform.len( code ) > 3 )
{
// no action, as it`s not a code
return ; // #######TODO 改写 LABEL与GOTO #### goto LblEnd
//return ; // #### goto LblEnd
Platform.streamInsert( argtarstm, 0, line );
continue;
}
desc = "";
Platform.streamClear( descStm );
......@@ -44,7 +46,9 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm)
if( Platform.errorCode() > 0 )
{
// 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 );
trimStream( descStm, tmpStm );
......@@ -59,7 +63,7 @@ void bolGetCodeDesc(IStream argsrcstm,IStream argtarstm)
line = Platform.mid( line, 1, endPos ) + code + " " + desc + Platform.mid( line, nextPos );
}
}
// #######TODO 改写 LABEL与GOTO #### label LblEnd
// #### label LblEnd
Platform.streamInsert( argtarstm, 0, line );
}
......
......@@ -29,7 +29,8 @@ void setCORTYP()
{
if( Platform.searchBlock( $valcortyp.getValue(), cortyp ) == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextIdx
//return ; // #### goto NextIdx
continue;
}
}
switch( cortyp )
......@@ -142,7 +143,7 @@ void setCORTYP()
setval = setval + cortyp + "\r\n";
}
}
// #######TODO 改写 LABEL与GOTO #### label NextIdx
// #### label NextIdx
}
// if CORTYP is not allowed, ignore manual input and redefault
if( Platform.searchBlock( setval, $cortyp.getValue() ) == 0 )
......@@ -177,7 +178,7 @@ void setCORTYP()
{
Platform.disable( $cortyp );
}
// #######TODO 改写 LABEL与GOTO #### label nodef
// #### label nodef
setOldValues();
//if IsModified( CORTYP ) then
// ResetModified( CORTYP )
......
......@@ -9,12 +9,12 @@ check $adrbic order 1000
if( Platform.compareTo( $cortyp.getValue() , "SWT" ) == 0 && Platform.isEmpty( $adrbic ) )
{
Platform.errorMessage( #CT000086 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
$\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()
{
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";
// #######TODO 改写 LABEL与GOTO #### label NextIdx
// #### label NextIdx
}
return setval;
......
......@@ -90,7 +90,7 @@ void printAllTags()
}
break;
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
total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
......@@ -175,7 +175,71 @@ void printAllTags()
if( Platform.errorCode() == -500 )
{
// 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 )
{
......
......@@ -81,7 +81,7 @@ void printDocFromSMH(#smh insmh,#prt inprt,String outfilename)
default:
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() );
if( Platform.errorCode() == 0 )
{
......
......@@ -188,7 +188,12 @@ void popupDocWithSMH(#smh insmh,String intitle)
if( ! Platform.fileExists( $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(), "" );
break;
......@@ -202,7 +207,7 @@ void popupDocWithSMH(#smh insmh,String intitle)
default:
Platform.setErrorCode( 599, Platform.formatText( "GetViewFromSMH returned unknown format \'$1\'", viewFmt ) );
}
// #######TODO 改写 LABEL与GOTO #### label ErrorLabel
// #### label ErrorLabel
if( Platform.errorCode() > 0 )
{
Platform.message( #CT000367, $filename.getValue(), Platform.getErrorText(), Platform.errorCode() );
......
......@@ -5,7 +5,9 @@ int splitMsgDTAInc()
Platform.clear( $msgctl ); // list of start/end line per message
int nextA1 = Platform.streamSearch( $ascin, ":A1:" );
int start = 1;
// #######TODO 改写 LABEL与GOTO #### label SearchNextA1
// #### label SearchNextA1
SearchNextA1Label:
while(true){
nextA1 = Platform.streamSearch( $ascin, ":A1:", nextA1 + 1 );
int end = nextA1 - 1;
if( end <= 0 )
......@@ -16,7 +18,10 @@ int splitMsgDTAInc()
start = nextA1;
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() );
......
......@@ -79,7 +79,8 @@ void printAllFldStream(boolean printfooterflag)
// skip system tags
if( Platform.compareTo( format , "SYS" ) == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
//return ; // #### goto NextField
continue;
}
// Load Content
content = Platform.loadContent( orifieldname, $fldstream.getValue() );
......@@ -251,7 +252,7 @@ void printAllFldStream(boolean printfooterflag)
{
newline = true;
}
// #######TODO 改写 LABEL与GOTO #### label NextField
// #### label NextField
}
if( printfooterflag )
{
......
......@@ -80,7 +80,7 @@ void printAllTagsTCO(IStream docstream,String intitle,String indir,String incort
}
break;
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
total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
......@@ -154,7 +154,68 @@ void printAllTagsTCO(IStream docstream,String intitle,String indir,String incort
if( Platform.errorCode() == -500 )
{
// 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 )
{
......
......@@ -79,7 +79,8 @@ void printAllFldStreamTCO(boolean printfooterflag)
// skip system tags
if( Platform.compareTo( format , "SYS" ) == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
//return ; // #### goto NextField
continue;
}
// Load Content
content = Platform.loadContent( orifieldname, $fldstream.getValue() );
......@@ -251,7 +252,7 @@ void printAllFldStreamTCO(boolean printfooterflag)
{
newline = true;
}
// #######TODO 改写 LABEL与GOTO #### label NextField
// #### label NextField
}
if( printfooterflag )
{
......
......@@ -90,7 +90,7 @@ void printAllTagsTCO1()
}
break;
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
total = splitMsgDTAInc();
for(int logicalFileIdx = 1;logicalFileIdx <= total;logicalFileIdx++)
......@@ -167,7 +167,71 @@ void printAllTagsTCO1()
if( Platform.errorCode() == -500 )
{
// 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 )
{
......
......@@ -54,7 +54,7 @@ void popupDocWithSMHben(#smh insmh,String intitle)
default:
Platform.setErrorCode( 599, Platform.formatText( "GetViewFromSMH returned unknown format \'$1\'", viewFmt ) );
}
// #######TODO 改写 LABEL与GOTO #### label ErrorLabel
// #### label ErrorLabel
if( Platform.errorCode() > 0 )
{
Platform.message( #CT000434, $filename.getValue(), Platform.getErrorText(), Platform.errorCode() );
......
......@@ -321,7 +321,7 @@ BigDecimal clcFecIrtcal(#setfel line,String relcur,BigDecimal relamt,String feec
$$line\dat2 = Platform.add( $$line\dat2.getValue(), -1 );
enddat = $$line\dat2;
//return ; // #### goto restart
break restartLabel;
continue restartLabel;
}
// 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 ) );
......
......@@ -7,19 +7,21 @@ void loadWrkPty(String argptyinr)
int cnt = 0;
if( ! Platform.isEmpty( res ) )
{
// #######TODO 改写 LABEL与GOTO #### label restart
// #### label restart
restartLabel:
while(true){
// check if more than 20 steps to avoid dead loop
cnt = cnt + 1;
if( cnt > 20 )
{
$\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, #CT000002, "GetFecPtyinrOFW" );
return ; // #######TODO 改写 LABEL与GOTO #### goto Done
return ; // #### goto Done
}
// get PTY
Platform.cacheDbRead( $wrkpty, res, "INR" );
if( Platform.errorCode() == tdOdbcNotFound )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto Done
return ; // #### goto Done
}
else
{
......@@ -30,7 +32,8 @@ void loadWrkPty(String argptyinr)
if( ( ! Platform.isEmpty( $wrkpty\hbkconflg ) ) && ( ! Platform.isEmpty( $wrkpty\hbkinr ) ) && Platform.compareTo(res, $wrkpty\hbkinr.getValue()) != 0 )
{
res = $wrkpty\hbkinr;
return ; // #######TODO 改写 LABEL与GOTO #### goto restart
//return ; // #### goto restart
continue restartLabel;
}
// check HEQACCFLG
// 可能會有自指的現象,需要考慮
......@@ -38,10 +41,13 @@ void loadWrkPty(String argptyinr)
if( ( ! Platform.isEmpty( $wrkpty\heqconflg ) ) && ( ! Platform.isEmpty( $wrkpty\heqinr ) ) && Platform.compareTo(res, $wrkpty\heqinr.getValue()) != 0 )
{
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
gleStoreEntry( $gle );
}
}
// #######TODO 改写 LABEL与GOTO #### label Endsav
// #### label Endsav
}
\ No newline at end of file
void gleStoreEntry(#gle entry)
{
dontsavLabel:
while(true){
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 ) )
{
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;
if( Platform.errorCode() != 0 )
{
Platform.sysDump( "Cannot get \\TRN\\INR" );
Platform.clear( $$entry\trninr );
return ; // #######TODO 改写 LABEL与GOTO #### goto dontsav
//return ; // #### goto dontsav
break dontsavLabel;
}
int order = $\trnmod\glenmb;
$$entry\gleord = Platform.toString( order + 1 );
......@@ -43,7 +48,9 @@ void gleStoreEntry(#gle entry)
$$entry\valdat = $$entry\bucdat;
}
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() );
Platform.streamInsert( $gleshwstm.getValue(), 0, line );
......
......@@ -35,7 +35,9 @@ void convertSwt(#trn argtrn,IStream swtstm)
if( Platform.errorCode() > 0 )
{
rc = "E";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror
//return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
}
Platform.streamSet( $msgout.getValue(), $msgin.getValue() );
replaceFirstchar();
......@@ -48,24 +50,32 @@ void convertSwt(#trn argtrn,IStream swtstm)
if( Platform.errorCode() > 0 )
{
rc = "E";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror
//return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
}
msgcount = $docimm.splitMsg( $msgout.getValue() );
if( Platform.errorCode() > 0 )
{
rc = "R";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror
//return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
}
$docimm.splitMsgGetCtl( $msgctl.getValue() );
rc = transmitMessage( argtrn );
if( Platform.compareTo(rc, "D") != 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror
//return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
}
if( Platform.errorCode() > 0 )
{
rc = "E";
return ; // #######TODO 改写 LABEL与GOTO #### goto doneerror
//return ; // #### goto doneerror
Platform.dbCloseCursor();
return;
}
Platform.streamInsert( swtstm, 0, $msgout.getValue() );
}
......@@ -77,7 +87,7 @@ void convertSwt(#trn argtrn,IStream swtstm)
}
}
}
// #######TODO 改写 LABEL与GOTO #### label doneerror
// #### label doneerror
Platform.dbCloseCursor();
}
\ No newline at end of file
......@@ -4,11 +4,14 @@ void scanimage()
//>>>传递参数,根据参数调用影像接口
//<<<end
String key = "";
scanLabel:
while(true){
if( Platform.compareTo( Platform.getTransName() , "OFFICE" ) == 0 )
{
//批量扫描
key = " p ";
return ; // #######TODO 改写 LABEL与GOTO #### goto scan
//return ; // #### goto scan
break scanLabel;
}
//判断点击按钮是history image还是image
String block = Platform.getContext( "TRIGGER" );
......@@ -61,7 +64,8 @@ void scanimage()
else
{
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()
Platform.exitEvent();
}
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 交易单独处理
// #######TODO 改写 LABEL与GOTO #### label scan
// #### label scan
if( ! Platform.isEmpty( key ) )
{
// PromptOK( 'R0000052
......
......@@ -76,7 +76,7 @@ String getDcrefPart(String trn,String dcinr,Argument<String> pattyp)
}
}
}
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
return dcref;
}
\ No newline at end of file
......@@ -9,6 +9,8 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr)
BigDecimal del = new BigDecimal("0");
BigDecimal tim = new BigDecimal("0");
// #######TODO 改写 LABEL与GOTO #### label CheckTarget
CheckTargetLabel:
while(true){
IStream str = new StreamImpl();
String msg = NULLSTR;
if( Platform.ddeTestTopic( trigger, ddeTopic ) )
......@@ -33,7 +35,8 @@ static void ddeSendIMAGEStream(String argtrn,IStream argstr)
Platform.pause( del );
tim = Platform.numAdd(tim , del);
// $Del = $Del * 2
return ; // #######TODO 改写 LABEL与GOTO #### goto CheckTarget
//return ; // #### goto CheckTarget
continue CheckTargetLabel;
}
else
{
......@@ -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)
{
//! retrieves next date
//! this function needs not to respect grace period, as this is respected on calling
// #######TODO 改写 LABEL与GOTO #### label nextdate
// #### label nextdate
// generate next date
int year = 0;
int month = 0;
......
......@@ -31,6 +31,8 @@ void registersettlementLiaZZ()
{
roldbt = rolRpl;
}
SetFeeLabel:
while(true){
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
......@@ -96,7 +98,8 @@ void registersettlementLiaZZ()
if( ! Platform.isEmpty( wrn ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto SetFee
//return ; // #### goto SetFee
break SetFeeLabel;
}
}
}
......@@ -136,7 +139,9 @@ void registersettlementLiaZZ()
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
$todat = NULLDATE
......
......@@ -14,10 +14,13 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg
lstdat = dat2;
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 ) )
{
begdat = lstdat;
return ; // #######TODO 改写 LABEL与GOTO #### goto SetRes
//return ; // #### goto SetRes
break SetResLabel;
}
// If not, try to find relevant date from fee pool
IStream chkStm = new StreamImpl();
......@@ -49,7 +52,8 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg
{
todat = null;
wrn = #CT000326;
return ; // #######TODO 改写 LABEL与GOTO #### goto SetRes
//return ; // #### goto SetRes
break SetResLabel;
}
else
{
......@@ -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 )
{
wrn = Platform.getText( #CT000327, $\liaall\liaallg[i]\feecod.getValue() );
return ; // #######TODO 改写 LABEL与GOTO #### goto SetRes
//return ; // #### goto SetRes
break SetResLabel;
}
else
{
......@@ -104,12 +109,15 @@ void getRelevantDates(int liaallgidx,Argument<Date> argbegdat,Argument<Date> arg
if( ! Platform.isEmpty( fecBegdat ) )
{
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;
argtodat.value = todat;
argwrn.value = wrn;
......
......@@ -48,7 +48,9 @@ void getOldCovers(IModule mod)
mainmod = mod;
donflg = true;
}
// #######TODO 改写 LABEL与GOTO #### label rep
// #### label rep
repLabel:
while(true){
int chk = 1;
String extid = NULLSTR;
int use = 0;
......@@ -148,7 +150,10 @@ void getOldCovers(IModule mod)
Platform.streamClear( ids );
Platform.streamInsert( ids, 0, Platform.getLine( 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
int stmCntOld = Platform.streamCount( oldIdxStm );
......
......@@ -4,16 +4,21 @@ event $add order 1000
int num = Platform.gridCount( $liaccvg );
int idx = 1;
String insflg = "Y";
chooseCcvLabel:
while(true){
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 ) )
{
idx = line;
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 )
{
Platform.gridInsertRow( $liaccvg, 0 );
......
......@@ -7,19 +7,19 @@ default $cbe\acc order 1000
Platform.disable( $cbe\acc );
Platform.setFieldValue( $cbe\acc, $wrkcbe\acc );
$cbe\acc = $wrkcbe\acc.getValue();
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
if( Platform.isEmpty( $cbe\cur ) )
{
Platform.disable( $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 ) )
{
Platform.disable( $cbe\acc );
Platform.setFieldValue( $cbe\acc, $cbe\acc );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
else
{
......@@ -51,6 +51,6 @@ default $cbe\acc order 1000
{
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
{
Platform.disable( $cbe\acc2 );
$cbe\acc2 = $wrkcbe\acc2.getValue();
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
if( Platform.isEmpty( $cbe\cur ) || ! Platform.isEmpty( $nobookcat ) )
{
$\sysmod.disableAndClearField( Platform.getDatafield($cbe,"acc2") );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
String trmtyp = NULLSTR;
if( ( Platform.isEmpty( $liaacc2ptyinr ) || ( Platform.compareTo( $cbe\amt , 0 ) == 0 ) ) && ( Platform.compareTo( $wrkcbb\amt , 0 ) == 0 ) )
{
Platform.disable( $cbe\acc2 );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
else
{
......@@ -60,6 +60,6 @@ default $cbe\acc2 order 1000
{
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)
// clear register to accumulate balance
BigDecimal amt = new BigDecimal("0");
$lsa\xrfdat = Platform.today();
// #######TODO 改写 LABEL与GOTO #### label LSCLoop
// #### label LSCLoop
// Loop thru LSC"s, convert to LSB\CUR and sum together
LSCLoopLabel:
while(true){
Platform.DBFetch( $lsc );
if( Platform.errorCode() <= 0 )
{
......@@ -26,7 +28,8 @@ void lscReevaluateLsbBalance(String lsbinr)
$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" );
amt = Platform.numAdd(amt , $lsc\xrfamt.getValue());
return ; // #######TODO 改写 LABEL与GOTO #### goto LSCLoop
//return ; // #### goto LSCLoop
continue LSCLoopLabel;
}
else
{
......@@ -35,6 +38,8 @@ void lscReevaluateLsbBalance(String lsbinr)
Platform.reraise();
}
}
break LSCLoopLabel;
}
$lsa\useamt = amt;
// Update LSA
Platform.sdbUpdate( $lsa );
......
......@@ -13,7 +13,9 @@ String lscCheckTrnAccepted(String argtrninr)
String rtn = "";
// build a list of all existing LSMFLG`s of the Transaction
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 );
if( Platform.errorCode() != tdOdbcNotFound )
{
......@@ -23,8 +25,9 @@ String lscCheckTrnAccepted(String argtrninr)
case "O":
case "A":
rtn = LscAccepted;
//return ; // #######TODO 改写 LABEL与GOTO #### goto NextLsm
break;
//return ; // #### goto NextLsm
continue NextLsmLabel;
//break;
case "R":
rtn = LscRejected;
break;
......@@ -32,6 +35,8 @@ String lscCheckTrnAccepted(String argtrninr)
rtn = LscPending;
}
}
break NextLsmLabel;
}
Platform.dbCloseCursor();
return rtn;
......
......@@ -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 );
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;
// Now determine the relevant PTY
......@@ -91,7 +95,7 @@ void getObjInf(IModule argobj,Argument<String> bussec,Argument<String> ptyinr,Ar
// has to exist
ptyPth = Platform.getModuleInfo( $pty, tdModuleInfoFullName );
}
// #######TODO 改写 LABEL与GOTO #### label GetPtyDta
// #### label GetPtyDta
ptyinr.value = Platform.getContent( ptyPth + "\\INR" );
heqinr.value = Platform.getContent( ptyPth + "\\HEQINR" );
ctycod.value = Platform.getContent( ptyPth + "\\RSKCTY" );
......
......@@ -10,19 +10,45 @@ void lsiProcessCbeEntry(#cbe argcbe,IModule arggrp)
String lsrLst = mapCbt2Lst( argcbe, arggrp );
// Read or initialize the LSR to be used
Platform.lscReadLsrForCbe( $lsr, argcbe, lsrLst );
boolean TopENGINFlag = true;
if( Platform.compareTo( Platform.mid( $$argcbe\cbt.getValue(), 4, 3 ) , "IN " ) == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto TopENGIN
//return ; // #### goto TopENGIN
}
else
{
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
// #######TODO 改写 LABEL与GOTO #### label TopENGIN
// #### label TopENGIN
// Create new request (when contract has no request)
if( Platform.isEmpty( $lsr\inr ) )
{
......@@ -46,7 +72,7 @@ void lsiProcessCbeEntry(#cbe argcbe,IModule arggrp)
if(1==1) return;
//--------------------------------------------------------
// Handling of ENGout
// #######TODO 改写 LABEL与GOTO #### label TopENGout
// #### label TopENGout
// no handling when no request exists
if( Platform.isEmpty( $lsr\inr ) )
{
......
......@@ -17,7 +17,7 @@ String lsnCheckTrnAccepted(String argtrninr)
case "A":
rtn = LscAccepted;
//return ; // #### goto NextLne
break NextLneLabel;
continue NextLneLabel;
case "R":
rtn = LscRejected;
break;
......
......@@ -72,7 +72,9 @@ event $sav order 200
warFlg = true;
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
......@@ -98,7 +100,7 @@ event $sav order 200
Platform.exitEvent();
}
}
// #######TODO 改写 LABEL与GOTO #### label skipLabel
// #### label skipLabel
// initialize workflow entries, if not recalculation
$\trnmod.init200();
$\trnmod\trnism.wfmInitNewEntry();
......
......@@ -18,11 +18,15 @@ void checkOpenIssues(IModule arggrp)
int dummy = $syswrn.sysWarningGroupRemove( "", sysWrnPfx );
if( Platform.recIsEmptyInr( arggrp ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto ExitOfRoutine
//return ; // #### goto ExitOfRoutine
$syswrn.sysWarningGroupCompleted();
return;
}
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
int hardLinkCnt = 0;
......@@ -58,7 +62,7 @@ void checkOpenIssues(IModule arggrp)
linHardNr = Platform.streamSearch( $cfginf\chiconnectstm, "H" );
if( linHardNr == 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto LblCheckSoftLinks
//return ; // #### goto LblCheckSoftLinks
}
else
{
......@@ -82,7 +86,7 @@ void checkOpenIssues(IModule arggrp)
Platform.dbFetchFields( "", hardLinkCnt );
Platform.dbCloseCursor();
}
// #######TODO 改写 LABEL与GOTO #### label LblCheckSoftLinks
// #### label LblCheckSoftLinks
for(int i = 1;i <= subConCnt;i++)
{
connectTyp = Platform.getLine( $cfginf\chiconnectstm.getValue(), i );
......@@ -319,7 +323,7 @@ void checkOpenIssues(IModule arggrp)
{
$syswrn.sysWarningSet( SYSWRNTypeWarning, #CT000165, sysWrnPfx + "SPTOPNCNT" );
}
// #######TODO 改写 LABEL与GOTO #### label ExitOfRoutine
// #### label ExitOfRoutine
// restore the already read status of the (re)created warning entries
$syswrn.sysWarningGroupCompleted();
......
......@@ -7,9 +7,12 @@ void checkusrspt()
}
// 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() );
NoAbortFoundLabel:
while(true){
if( Platform.errorCode() > 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound
//return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
}
// Load the session of the SPT
String ssnSta = "";
......@@ -20,17 +23,20 @@ void checkusrspt()
Platform.dbCloseCursor();
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
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
if( Platform.diff($\sysmod\spt\dattim.getValue() , ssnDattim)<0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound
//return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
}
int ssnCnt = 0;
// check whether found session is the last session
......@@ -39,11 +45,13 @@ void checkusrspt()
Platform.dbCloseCursor();
if( Platform.errorCode() > 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound
//return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
}
if( ssnCnt > 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound
//return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
}
boolean que = Platform.prompt( #CT000024, $\sysmod\spt\dattim.getValue() );
String sptEty = NULLSTR;
......@@ -67,7 +75,8 @@ void checkusrspt()
{
Platform.message( #CT000027, sptEty );
Platform.dbFree( $\sysmod\spt );
return ; // #######TODO 改写 LABEL与GOTO #### goto NoAbortFound
//return ; // #### goto NoAbortFound
break NoAbortFoundLabel;
}
}
}
......@@ -79,7 +88,9 @@ void checkusrspt()
Platform.dbFree( $\sysmod\spt );
}
}
// #######TODO 改写 LABEL与GOTO #### label NoAbortFound
break NoAbortFoundLabel;
}
// #### label NoAbortFound
Platform.clear( $\sysmod\spt );
if( Platform.errorCode() != tdOdbcNotFound )
{
......
......@@ -4,7 +4,7 @@ void ptsRolesAdjust(IModule argmod,IStream stm)
//! These may remove roles not allowed for contract Argmod using PtsRemoveRol
//! Or disallow changes of roles using PtsSetRolChgFlg
boolean retry = false;
// #######TODO 改写 LABEL与GOTO #### label Restart
// #### label Restart
// Inititalize RolChgFlg for all roles
int max = Platform.streamCount( stm );
for(int i = 1;i <= max;i++)
......
......@@ -9,13 +9,18 @@ void deleteSet(IModule rec,String sqlarg)
//! The entries to be deleted are selected and entrywise
//! locked and then deleted.
Platform.dbSelectCursor( rec, sqlarg );
// #######TODO 改写 LABEL与GOTO #### label DelLoop
// #### label DelLoop
DelLoopLabel:
while(true){
Platform.DBFetch( rec );
if( Platform.errorCode() != tdOdbcNotFound )
{
Platform.reraise();
Platform.sdbDelete( rec );
return ; // #######TODO 改写 LABEL与GOTO #### goto DelLoop
//return ; // #### goto DelLoop
continue DelLoopLabel;
}
break DelLoopLabel;
}
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