called procedures when looping
This commit is contained in:
@ -2197,6 +2197,7 @@ namespace CobXmlSupport
|
|||||||
private void createXMLMoveCode(savedFile SF, bool justOut = false)
|
private void createXMLMoveCode(savedFile SF, bool justOut = false)
|
||||||
{
|
{
|
||||||
bool loopTyp = false;
|
bool loopTyp = false;
|
||||||
|
string SectionNames="",BoolVars="";
|
||||||
qualifieldhlp locTmpQfh = null;
|
qualifieldhlp locTmpQfh = null;
|
||||||
//Create showing window
|
//Create showing window
|
||||||
fromToMoves = new ShowCode();
|
fromToMoves = new ShowCode();
|
||||||
@ -2272,6 +2273,10 @@ namespace CobXmlSupport
|
|||||||
//Perform
|
//Perform
|
||||||
fromToMoves.CodeShower.Text += " PERFORM VARYING " + indTxt + " FROM 1 BY 1\r\n UNTIL " +
|
fromToMoves.CodeShower.Text += " PERFORM VARYING " + indTxt + " FROM 1 BY 1\r\n UNTIL " +
|
||||||
indTxt + "\r\n > " + locTmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + locTmpQfh.indexRedText;
|
indTxt + "\r\n > " + locTmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + locTmpQfh.indexRedText;
|
||||||
|
|
||||||
|
string tmpCheckVar = "";
|
||||||
|
fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "NXTO-",
|
||||||
|
indTxt, ref SectionNames) + "\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2352,6 +2357,8 @@ namespace CobXmlSupport
|
|||||||
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fromToMoves.CodeShower.Text = SectionNames + "\r\n" + fromToMoves.CodeShower.Text;
|
||||||
|
fromToMoves.CodeShower.Text = BoolVars + "\r\n" + fromToMoves.CodeShower.Text;
|
||||||
//List all used indexes
|
//List all used indexes
|
||||||
string tempIndText = "";
|
string tempIndText = "";
|
||||||
fromToMoves.CodeShower.Text = addOccursVars(testIndexes, fromToMoves.CodeShower.Text, tempIndText);
|
fromToMoves.CodeShower.Text = addOccursVars(testIndexes, fromToMoves.CodeShower.Text, tempIndText);
|
||||||
@ -2360,6 +2367,24 @@ namespace CobXmlSupport
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string createAftReferenceSections(string tagName, string procPrefix, string indexVar, ref string wrkSectStr)
|
||||||
|
{
|
||||||
|
string tmpProcName = procPrefix + tagName.Replace("\"", "").Replace(":", "");;
|
||||||
|
if (!wrkSectStr.Contains(tmpProcName))
|
||||||
|
{
|
||||||
|
wrkSectStr += "\r\n *>------------------- HANDLE SECTION --------------*" + tmpProcName;
|
||||||
|
wrkSectStr += "\r\n * Den här sektionen används för att positionera ";
|
||||||
|
wrkSectStr += "\r\n * datat när den genererade xml-proceduren körs";
|
||||||
|
wrkSectStr += "\r\n *-------------------- HANDLE SECTION --------------*\r\n";
|
||||||
|
wrkSectStr += "\r\n " + tmpProcName + " SECTION.";
|
||||||
|
wrkSectStr += "\r\n * Styrs av :" + indexVar;
|
||||||
|
wrkSectStr += "\r\n .";
|
||||||
|
wrkSectStr += "\r\n " + tmpProcName + "-EX.";
|
||||||
|
wrkSectStr += "\r\n EXIT.\r\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
return tmpProcName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void btnFrXMLTo_Click(object sender, EventArgs e)
|
private void btnFrXMLTo_Click(object sender, EventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user