Defined occurs when exists, init right index when looping in xml
This commit is contained in:
@ -752,6 +752,7 @@ namespace CobXmlSupport
|
|||||||
chkDisplays.Checked = true;
|
chkDisplays.Checked = true;
|
||||||
chkWrap.Checked = true;
|
chkWrap.Checked = true;
|
||||||
chkNewArea.Checked = false;
|
chkNewArea.Checked = false;
|
||||||
|
//chkNewArea.Checked = true;
|
||||||
ClientSizeMinWidth = this.ClientSize.Width;
|
ClientSizeMinWidth = this.ClientSize.Width;
|
||||||
|
|
||||||
|
|
||||||
@ -879,7 +880,7 @@ namespace CobXmlSupport
|
|||||||
private void btnGenICodeNew_Click(object sender, EventArgs e)
|
private void btnGenICodeNew_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool justOut = true;
|
bool justOut = true;
|
||||||
bool loopTyp = false;
|
//bool loopTyp = false;
|
||||||
|
|
||||||
Dictionary<string, string> indexNames = new Dictionary<string, string>();
|
Dictionary<string, string> indexNames = new Dictionary<string, string>();
|
||||||
string IndVarText = " *--------------------------------------------------*\r\n * Extra indexvariabler för occurs-taggar --------*\r\n *--------------------------------------------------*";
|
string IndVarText = " *--------------------------------------------------*\r\n * Extra indexvariabler för occurs-taggar --------*\r\n *--------------------------------------------------*";
|
||||||
@ -1919,7 +1920,7 @@ namespace CobXmlSupport
|
|||||||
SF.idConnect = "0A975654-75C6-4A8C-8534-AA16F46BC740";
|
SF.idConnect = "0A975654-75C6-4A8C-8534-AA16F46BC740";
|
||||||
SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Transfer";
|
SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Transfer";
|
||||||
SF.fNameSaved = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Transfer.cbl";
|
SF.fNameSaved = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Transfer.cbl";
|
||||||
fromMoves.SavedFile = SF;
|
fromToMoves.SavedFile = SF;
|
||||||
|
|
||||||
bool adj = false;
|
bool adj = false;
|
||||||
bool valueSwitch = false;
|
bool valueSwitch = false;
|
||||||
@ -2229,9 +2230,11 @@ namespace CobXmlSupport
|
|||||||
if (!justOut)
|
if (!justOut)
|
||||||
{
|
{
|
||||||
//Before perform varying, move the count-value from old structure to new
|
//Before perform varying, move the count-value from old structure to new
|
||||||
fromToMoves.CodeShower.Text += " MOVE " + tmpQfh.qualCobRow.CountIn + "\r\n" + tmpQfh.indexRedText;
|
string chosenKey = testIndexes.FirstOrDefault(x => x.Value == indTxt).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex
|
||||||
|
qualifieldhlp locTmpQfh = qldList.First(x => x.qualCobRow.FieldName == chosenKey); // Find QualifiedHelp-object for right field
|
||||||
|
fromToMoves.CodeShower.Text += " MOVE " + locTmpQfh.qualCobRow.CountIn + "\r\n" + locTmpQfh.indexRedText;
|
||||||
fromToMoves.CodeShower.Text += " TO " +
|
fromToMoves.CodeShower.Text += " TO " +
|
||||||
tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + tmpQfh.indexRedText;
|
locTmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + locTmpQfh.indexRedText;
|
||||||
}
|
}
|
||||||
//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 " +
|
||||||
@ -2346,7 +2349,7 @@ namespace CobXmlSupport
|
|||||||
|
|
||||||
fromToMoves.Show();
|
fromToMoves.Show();
|
||||||
//createXMLMoveCode();
|
//createXMLMoveCode();
|
||||||
func_exit: ;
|
//func_exit: ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadResWords()
|
private void loadResWords()
|
||||||
|
|||||||
@ -83,18 +83,27 @@ namespace CobXmlSupport
|
|||||||
if(!latestList.Contains(wrkList[i])){
|
if(!latestList.Contains(wrkList[i])){
|
||||||
string countVar = "";
|
string countVar = "";
|
||||||
string tagName = "";
|
string tagName = "";
|
||||||
|
int occNum = 0;
|
||||||
if (!wrkList[i].Equals(""))
|
if (!wrkList[i].Equals(""))
|
||||||
{
|
{
|
||||||
string chosenKey = indexes.FirstOrDefault(x => x.Value == wrkList[i]).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex
|
string chosenKey = indexes.FirstOrDefault(x => x.Value == wrkList[i]).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex
|
||||||
countVar = rows.First(x => x.FieldName == chosenKey).CountIn; // from cobrows find "Count In"-variable for given FieldName
|
countVar = rows.First(x => x.FieldName == chosenKey).CountIn; // from cobrows find "Count In"-variable for given FieldName
|
||||||
tagName = rows.First(x => x.FieldName == chosenKey).TagName; // from cobrows find "xmltag" for given FieldName
|
tagName = rows.First(x => x.FieldName == chosenKey).TagName; // from cobrows find "xmltag" for given FieldName
|
||||||
|
occNum = rows.First(x => x.FieldName == chosenKey).occNum;
|
||||||
string inLst = "";
|
string inLst = "";
|
||||||
int j = i + 1;
|
int j = i + 1;
|
||||||
|
|
||||||
//genCode += "\r\n *>" + wrkString;
|
//genCode += "\r\n *>" + wrkString;
|
||||||
if (inOut) // When moving to cobol xml structure
|
if (inOut) // When moving to cobol xml structure
|
||||||
|
{
|
||||||
|
if (occNum.ToString() != S.ettingMaxOcc && occNum!=0)
|
||||||
|
{
|
||||||
|
genCode += "\r\n MOVE " + occNum.ToString() + " TO " + countVar;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
genCode += "\r\n MOVE " + S.ettingMaxOcc + " TO " + countVar;
|
genCode += "\r\n MOVE " + S.ettingMaxOcc + " TO " + countVar;
|
||||||
|
}
|
||||||
// genCode += "\r\n MOVE 0 TO " + countVar;
|
// genCode += "\r\n MOVE 0 TO " + countVar;
|
||||||
while (wrkList.Length > j)
|
while (wrkList.Length > j)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user