Here's an example of what the TD Client header and footer looks like as well as a script another customer of ours used to automatically add the header and footer to the corrections text file.


Header/Footer information:


string header = $"O*N05TG50002 ,CLS=CORR{awardYear}IN,XXX,BAT=, ";

string footer = $"O*N95TG50002 ,CLS=CORR{awardYear}IN,XXX,BAT=, ";



Example of a script a school used to auto-add the header/footer to a Corrections file for TD Client:


var awardYear = DateTime.UtcNow.Year.ToString().Substring(2, 1) + lineWithAwardYear.Substring(0, 1);

string header = $"O*N05TG50002 ,CLS=CORR{awardYear}IN,XXX,BAT=, ";

string footer = $"O*N95TG50002 ,CLS=CORR{awardYear}IN,XXX,BAT=, ";


//where the carraige return is not getting appended

if (lines[0].StartsWith("O*N05") && lines[0] != header)

{

sw.Write(header + "\r\n" + string.Join("\r\n", lines.Take(lines.Count() - 1).Skip(1).ToArray()) + footer);

}

else if (lines[0] != header)

{

sw.Write(header + "\r\n" + string.Join("\r\n", lines) + "\r\n" + footer);

}

else

{

sw.Write(string.Join("\r\n", lines));

}

sw.Close();

sw.Dispose();