Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN {
- if (ARGC > 2) {
- InputFile = ARGV[1];
- OutputFile = ARGV[2];
- ARGV[2] = "";
- } else {
- print("Output file name not specified.");
- OutputFile = "Nul";
- }
- if (ARGC > 3) {
- sep = ARGV[3];
- RS = sep "|" sep "\n|" sep "\r\n";
- ARGV[3] = "";
- } else {
- RS = "~|~\n|~\r\n|\n|\r\n|\32+"; # Input Record Separator
- }
- False = 0;
- True = 1;
- HaveError = False;
- HaveTA1 = False;
- WroteHeader = False;
- Loop = "";
- TransactionSetSegments = 0;
- TestDocument = False;
- rejectedBatch = False;
- AckStatus["A"] = "The Transmitted Interchange Control Structure Header and Trailer Have Been Received and Have No Errors.";
- AckStatus["E"] = "The Transmitted Interchange Control Structure Header and Trailer Have Been Received and Are Accepted But Errors Are Noted.\n This Means the Sender Must Not Resend This data.";
- AckStatus["R"] = "The Transmitted Interchange Control Structure Header and Trailer are Rejected Because of Errors.";
- InterchangeCode[0] = "No Error";
- InterchangeCode[1] = "The Interchange Control Number in the Header and Trailer Do Not Match. The value From the Header is Used in the Acknowledgement";
- InterchangeCode[2] = "This Standard as Noted in the Control Standards Identifier is Not Supported.";
- InterchangeCode[3] = "This Version of the Controls is Not Supported";
- InterchangeCode[4] = "The Segment Terminator is Invalid";
- InterchangeCode[5] = "Invalid Interchange ID Qualifier for Sender";
- InterchangeCode[6] = "Invalid Interchange Sender ID";
- InterchangeCode[7] = "Invalid Interchange ID Qualifier for Receiver";
- InterchangeCode[8] = "Invalid Interchange Receiver ID";
- InterchangeCode[9] = "Unknown Interchange Receiver ID";
- InterchangeCode[10] = "Invalid Authorization Information Qualifier Value";
- InterchangeCode[11] = "Invalid Authorization Information Value";
- InterchangeCode[12] = "Invalid Security Information Qualifier Value";
- InterchangeCode[13] = "Invalid Security Information Value";
- InterchangeCode[14] = "Invalid Interchange Date Value";
- InterchangeCode[15] = "Invalid Interchange Time Value";
- InterchangeCode[16] = "Invalid Interchange Standards Identifier Value";
- InterchangeCode[17] = "Invalid Interchange Version ID Value";
- InterchangeCode[18] = "Invalid Interchange Control Number Value";
- InterchangeCode[19] = "Invalid Acknowledgment Requested Value";
- InterchangeCode[20] = "Invalid Test Indicator Value";
- InterchangeCode[21] = "Invalid Number of Included Groups Value";
- InterchangeCode[22] = "Invalid Control Structure";
- InterchangeCode[23] = "Improper (Premature) End-of-File (Transmission)";
- InterchangeCode[24] = "Invalid Interchange Content (e.g., Invalid GS Segment)";
- InterchangeCode[25] = "Duplicate Interchange Control Number";
- InterchangeCode[26] = "Invalid Data Element Separator";
- InterchangeCode[27] = "Invalid Component Element Separator";
- InterchangeCode[28] = "Invalid Delivery Date in Deferred Delivery Request";
- InterchangeCode[29] = "Invalid Delivery Time in Deferred Delivery Request";
- InterchangeCode[30] = "Invalid Delivery Time Code in Deferred Delivery Request";
- InterchangeCode[31] = "Invalid Grade of Service Code";
- SegmentSyntaxError["1"] = "Unrecognized segment ID";
- SegmentSyntaxError["2"] = "Unexpected segment";
- SegmentSyntaxError["3"] = "Required segment missing";
- SegmentSyntaxError["4"] = "Loop Occurs Over Maximum Times";
- SegmentSyntaxError["5"] = "Segment Exceeds Maximum Use";
- SegmentSyntaxError["6"] = "Segment Not in Defined Transaction Set";
- SegmentSyntaxError["7"] = "Segment Not in Proper Sequence";
- SegmentSyntaxError["8"] = "Segment Has Data Element Errors";
- SegmentSyntaxError["I4"] = "Implementation \"Not Used\" Segment Present";
- SegmentSyntaxError["I6"] = "Implementation Dependent Segment Missing";
- SegmentSyntaxError["I7"] = "Implementation Loop Occurs Under Minimum Times";
- SegmentSyntaxError["I8"] = "Implementation Segment Below Minimum Use";
- SegmentSyntaxError["I9"] = "Implementation Dependent \"Not Used\" Segment Present";
- ElementError["1"] = "Required Data Element Missing";
- ElementError["2"] = "Conditional Required Data Element Missing";
- ElementError["3"] = "Too Many Data Elements";
- ElementError["4"] = "Data Element Too Short";
- ElementError["5"] = "Data Element Too Long.";
- ElementError["6"] = "Invalid Character In Data Element";
- ElementError["7"] = "Invalid Code Value";
- ElementError["8"] = "Invalid Date";
- ElementError["9"] = "Invalid Time";
- ElementError["12"] = "Too Many Repetitions";
- ElementError["13"] = "Too Many Components";
- ElementError["I10"] = "Implementation \"Not Used\" Data Element Present";
- ElementError["I11"] = "Implementation Too Few Repetitions";
- ElementError["I12"] = "Implementation Pattern Match Failure";
- ElementError["I13"] = "Implementation Dependent \"Not Used\" Data Element Present";
- ElementError["I6"] = "Code Value Not Used in Implementation";
- ElementError["I9"] = "Implementation Dependent Data Element Missing";
- SetStatus["A"] = "Accepted";
- SetStatus["E"] = "Accepted But Errors Were Noted\rThe transaction set indicated in this AK2 loop contained errors, but was forwarded for further processing.";
- SetStatus["M"] = "Rejected, Message Authentication Code (MAC) Failed";
- SetStatus["R"] = "Rejected\rThe transaction set indicated in this AK2 loop contained errors, and was NOT forwarded for further processing. It will need to be corrected and resubmitted.";
- SetStatus["W"] = "Rejected, Assurance Failed Validity Tests";
- SetStatus["X"] = "Rejected, Content After Decryption Could Not Be Analyzed";
- SetSyntaxErr["1"] = "Transaction Set Not Supported";
- SetSyntaxErr["2"] = "Transaction Set Trailer Missing";
- SetSyntaxErr["3"] = "Transaction Set Control Number in Header and Trailer Do Not Match";
- SetSyntaxErr["4"] = "Number of Included Segments Does Not Match Actual Count";
- SetSyntaxErr["5"] = "One or More Segments in Error";
- SetSyntaxErr["6"] = "Missing or Invalid Transaction Set Identifier";
- SetSyntaxErr["7"] = "Missing or Invalid Transaction Set Control Number";
- SetSyntaxErr["8"] = "Authentication Key Name Unknown";
- SetSyntaxErr["9"] = "Encryption Key Name Unknown";
- SetSyntaxErr["10"] = "Requested service (Authentication or Encrypted) Not Available";
- SetSyntaxErr["11"] = "Unknown Security Recipient";
- SetSyntaxErr["12"] = "Incorrect Message Length (Encryption Only)";
- SetSyntaxErr["13"] = "Message Authentication Code Failed";
- SetSyntaxErr["15"] = "Unknown Security Originator";
- SetSyntaxErr["16"] = "Syntax Error in Decrypted Text";
- SetSyntaxErr["17"] = "Security Not Supported";
- SetSyntaxErr["18"] = "Transaction Set not in Functional Group";
- SetSyntaxErr["19"] = "Invalid Transaction Set Implementation Convention Reference";
- SetSyntaxErr["23"] = "Transaction Set Control Number Not Unique within the Functional Group";
- SetSyntaxErr["24"] = "S3E Security End Segment Missing for S3S Security Start Segment";
- SetSyntaxErr["25"] = "S3S Security Start Segment Missing for S3E Security End Segment";
- SetSyntaxErr["26"] = "S4E Security End Segment Missing for S4S Security Start Segment";
- SetSyntaxErr["27"] = "S4S Security Start Segment Missing for S4E Security End Segment";
- SetSyntaxErr["I5"] = "Implementation One or More Segments in Error";
- SetSyntaxErr["I6"] = "Implementation Convention Not Supported";
- GroupStatus["A"] = "Accepted";
- GroupStatus["E"] = "Accepted But Errors Were Noted\rThe functional group indicated in this 999 contained errors, but was forwarded for further processing.";
- GroupStatus["M"] = "Rejected, Message Authentication Code (MAC) Failed";
- GroupStatus["P"] = "Partially Accepted, At least One Transaction Set Was Rejected";
- GroupStatus["R"] = "Rejected\rThe functional group indicated in this 999 contained errors, and was NOT forwarded for further processing. It will need to be corrected and resubmitted.";
- GroupStatus["W"] = "Rejected, Assurance Failed Validity Tests";
- GroupStatus["X"] = "Rejected, Content After Decryption Could Not Be Analyzed";
- GroupError["1"] = "Functional Group Not Supported";
- GroupError["2"] = "Functional Group Version Not Supported";
- GroupError["3"] = "Functional Group Trailer Missing";
- GroupError["4"] = "Group Control Number in the Functional Group Header and Trailer Do Not Agree";
- GroupError["5"] = "Number of Included Transaction Sets Does Not Match Actual Count";
- GroupError["6"] = "Group Control Number Violates Syntax";
- GroupError["10"] = "Authentication Key Name Unknown";
- GroupError["11"] = "Encryption Key Name Unknown";
- GroupError["12"] = "Requested Service (Authentication or Encryption) Not Available";
- GroupError["13"] = "Unknown Security Recipient";
- GroupError["14"] = "Unknown Security Originator";
- GroupError["15"] = "Syntax Error in Decrypted Text";
- GroupError["16"] = "Security Not Supported";
- GroupError["17"] = "Incorrect Message Length (Encryption Only)";
- GroupError["18"] = "Message Authentication Code Failed";
- GroupError["19"] = "Functional Group Control Number not Unique within Interchange";
- GroupError["23"] = "S3E Security End Segment Missing for S3S Security Start Segment";
- GroupError["24"] = "S3S Security Start Segment Missing for S3E End Segment";
- GroupError["25"] = "S4E Security End Segment Missing for S4S Security Start Segment";
- GroupError["26"] = "S4S Security Start Segment Missing for S4E Security End Segment";
- SenderName["00332"] = "National Government Services (AdminaStar)";
- SenderName["00363"] = "Veritus";
- SenderName["00390"] = "BCBS TN"
- SenderName["00450"] = "National Government Services (UGS)";
- SenderName["06001"] = "National Government Services (J6)";
- SenderName["10301"] = "Cahaba GBA";
- SenderName["12001"] = "Highmark Medicare Services rollup contractor";
- SenderName["12401"] = "Highmark Medicare Services";
- SenderName["15201"] = "CIGNA Government Services (CGS)";
- SenderName["52280"] = "WPS";
- SenderName["IHCP"] = "Indiana Health Coverage Programs"
- SenderName["KYMEDICAID"] = "Kentucky Medicaid";
- SenderName["41-1674742"] = "MN Department of Human Services";
- SenderName["345529167"] = "Pennsylvania Department of Public Welfare";
- SenderName["WISC_DHFS"] = "Wisconsin Medicaid"
- SenderName["MMISODJFS"] = "Ohio Dept of Job and Family Services";
- SenderName["D00111"] = "Michigan Department of Community Health";
- SenderName["ORDHS"] = "Oregon Department of Human Services"
- SenderName["77045"] = "Washington DSHS ProviderOne";
- SenderName["ID_MMIS_4MOLINA"] = "Idaho Medicaid";
- PayerName["00000"] = "Unknown";
- }
- /^ISA/ {
- FS = substr($0,4,1);
- SenderID = trim(substr($0,36,15));
- ReceiverID = trim(substr($0,55,15));
- InterchgCtlNbr = trim(substr($0,91,9));
- SUBSEP = substr($0,105,1);
- if (substr($0,103,1) == "T") {
- TestDocument = True;
- }
- WroteHeader = False;
- }
- /^TA1/ {
- HaveTA1 = True;
- TA101 = $2;
- TA102 = $3;
- TA103 = $4;
- TA104 = $5;
- TA104Desc = AckStatus[$5];
- TA105 = $6;
- TA105Desc = InterchangeCode[$6 + 0];
- }
- /^GS/ {
- PayerID = $3;
- ProcessDate = substr($5,5,2) "/" substr($5,7,2) "/" substr($5,1,4);
- ProcessTime = substr($6,1,2) ":" substr($6,3,2)
- if (length($6) > 4) {
- ProcessTime = ProcessTime ":" substr($6,5,2);
- }
- AckGroupCtlNbr = $7;
- WroteHeader = False;
- FunctionalGroupCount += 1;
- }
- /^ST/ {
- DocType = $2;
- AckCtlNbr = $3;
- TransactionSetCount += 1;
- # if ((DocType == "999") && (!WroteHeader)) {
- # print("Sender: . . . . . . . . . . " SenderID "\t" SenderName[SenderID]) >> OutputFile;
- # if (TestDocument) {
- # print("Document Usage: . . . . . . TEST") >> OutputFile;
- # }
- # print("Receiver: . . . . . . . . . " ReceiverID) >> OutputFile;
- # print("Interchange Number: . . . . " InterchgCtlNbr) >> OutputFile;
- # print("Payer: . . . . . . . . . . . " PayerID "\t" PayerName[PayerID]) >> OutputFile;
- # print("Process Date: . . . . . . . " ProcessDate) >> OutputFile;
- # print("Process Time: . . . . . . . " ProcessTime) >> OutputFile;
- # print("Acknowledgement") >> OutputFile;
- # print(" Group Control Number: . . " AckGroupCtlNbr) >> OutputFile;
- # WroteHeader = True;
- # }
- if ((DocType = "999") && (!WroteHeader)) {
- WriteHeader();
- }
- if (HaveTA1) {
- WriteTA1Data(TA101, TA102, TA103, TA104, TA104Desc, TA105, TA105Desc);
- }
- print("----------------------------------------------") >> OutputFile;
- haveST = True;
- }
- /^AK1/ {
- if (DocType == "999") {
- print("Acknowledging Functional Group") >> OutputFile;
- print(" Control Number: . . . . . " $3) >> OutputFile;
- PrevDocType = "";
- }
- }
- /^AK2/ {
- if (DocType == "999") {
- Loop = "2000";
- if (PrevDocType == $2) {
- print("") >> OutputFile;
- } else {
- print(" Document Type: . . . . . " $2) >> OutputFile;
- print("\n----------------------------------------------\n") >> OutputFile;
- PrevDocType = $2;
- }
- print("Acknowledging Transaction") >> OutputFile;
- print(" Set Control Number: . . . " $3) >> OutputFile;
- }
- }
- /^IK3/ {
- if (DocType == "999") {
- Loop = "2100";
- HaveError = True;
- print("\n********** ERROR **********") >> OutputFile;
- SegmentName = $2;
- if (SegmentName !="") {
- print("Segment Name . . . . . . . . " SegmentName) >> OutputFile;
- }
- if ($3 != "") {
- print("Position in Txn Set: . . . . " $3) >> OutputFile;
- }
- if ($4 != "") {
- print("Loop Identifier Code: . . . " $4) >> OutputFile;
- }
- if ($5 != "") {
- print("Error Description: . . . . . " SegmentSyntaxError[$5]) >> OutputFile;
- }
- }
- }
- /^CTX/ {
- if (DocType = "999") {
- if (Loop == "2100") {
- if ($2 == "SITUATIONAL TRIGGER") {
- if ($3 != "") {
- print("Segment: . . . . . . . . . . " $3) >> OutputFile;
- }
- if ($4 != "") {
- print("Position in Txn Set: . . . . " $4) >> OutputFile;
- }
- if ($5 != "") {
- print("Loop Identifier: . . . . . . " $5) >> OutputFile;
- }
- if ($6 != "") {
- print("Position in Segment: . . . . " $6) >> OutputFile;
- }
- if ((NF > 6) && ($7 != "")) {
- print("Data Element Reference . . " $7) >> OutputFile;
- }
- } else {
- if ($2 == "CLM01") {
- if ($3 != "") {
- print("Claim ID (PCN): . . . . . . . " $3) >> OutputFile;
- }
- } else {
- if ($2 != "") {
- print("Context Identifier: . . . . " $2) >> OutputFile;
- }
- if ($3 != "") {
- print("Context Reference: . . . . . . " $3) >> OutputFile;
- }
- }
- }
- }
- }
- }
- /^IK4/ {
- if (DocType == "999") {
- Loop = "2110";
- print("Implementation Information") >> OutputFile;
- if ($2 != "") {
- print(" Position in Segment: . . . " $2) >> OutputFile;
- }
- if ($3 != "") {
- print(" Element Dictionary: . . . " $3) >> OutputFile;
- }
- if ($4 != "") {
- print(" Element Error Description: ") >> OutputFile;
- print(" " ElementError[$4]) >> OutputFile;
- }
- if ((NF > 4) && ($5 != "")) {
- SegCopy = $5;
- for (i=6; i<=NF; i++) {
- SegCopy = SegCopy "*" $i;
- }
- SegCopy = "\"" SegCopy "\"";
- print("\n Copy of Bad Data Element:") >> OutputFile;
- print(" " SegCopy "\n") >> OutputFile;
- }
- }
- }
- /^CTX/ {
- if (DocType = "999") {
- if (Loop == "2110") {
- if ($2 == "SITUATIONAL TRIGGER") {
- if ($3 != "") {
- print(" Segment: . . . . . . . . . " $3) >> OutputFile;
- }
- if ($4 != "") {
- print(" Position in Txn Set: . . . " $4) >> OutputFile;
- }
- if ($5 != "") {
- print(" Loop Identifier: . . . . . " $5) >> OutputFile;
- }
- if ($6 != "") {
- print(" Position in Segment: . . . " $6) >> OutputFile;
- }
- if ((NF > 6) && ($7 != "")) {
- print(" Data Elem Reference: . . " $7) >> OutputFile;
- }
- }
- }
- }
- }
- /^IK5/ {
- if (DocType == "999") {
- Loop = "2100";
- if (HaveError) {
- print("********** ERROR **********\n") >> OutputFile;
- }
- HaveError = False;
- if ($2 != "") {
- print("Transaction Set Status: . . " SetStatus[$2]) >> OutputFile;
- }
- if (NF > 2) {
- print("\nTransaction Set Syntax Errors:") >> OutputFile;
- print(" " SetSyntaxErr[$3]) >> OutputFile;
- }
- if (NF > 3) {
- print(" " SetSyntaxErr[$4]) >> OutputFile;
- }
- if (NF > 4) {
- print(" " SetSyntaxErr[$5]) >> OutputFile;
- }
- if (NF > 5) {
- print(" " SetSyntaxErr[$6]) >> OutputFile;
- }
- if (NF > 6) {
- print(" " SetSyntaxErr[$7]) >> OutputFile;
- }
- if (NF > 2) {
- print("") >> OutputFile;
- }
- }
- }
- /^AK9/ {
- if (DocType == "999") {
- Loop = "";
- print("") >> OutputFile;
- print("Functional Group Status: . . " GroupStatus[$2]) >> OutputFile;
- print("Number of Sets: . . . . . . Included " $3 " Received " $4 " Accepted " $5) >> OutputFile;
- if (NF > 5) {
- print("\nFunctional Group Syntax Errors:") >> OutputFile;
- print(" " GroupError[$6]) >> OutputFile;
- }
- if (NF > 6) {
- print(" " GroupError[$7]) >> OutputFile;
- }
- if (NF > 7) {
- print(" " GroupError[$8]) >> OutputFile;
- }
- if (NF > 8) {
- print(" " GroupError[$9]) >> OutputFile;
- }
- if (NF > 9) {
- print(" " GroupError[$10]) >> OutputFile;
- }
- print("\n") >> OutputFile;
- }
- }
- /^SE/ {
- TSError = False;
- ErrorMsg = "";
- TSSegs = TransactionSetSegments + 1;
- if ($3 != AckCtlNbr) {
- TSError = True;
- ErrorMsg = "The transaction set control number in SE02 is " $3 ", but the value in ST02 is " AckCtlNbr ".";
- }
- if (TSSegs != $2) {
- if (TSError) {
- ErrorMsg = ErrorMsg "\n";
- }
- TSError = True;
- ErrorMsg = ErrorMsg "The actual number of segments in transaction set " AckCtlNbr " does not match the value in SE01.";
- }
- if (TSError) {
- print("********* WARNING *********") >> OutputFile;
- print(ErrorMsg) >> OutputFile;
- print("This may indicate that the 999 document is corrupt.") >> OutputFile;
- print("********* WARNING *********") >> OutputFile;
- }
- AckCtlNbr = "";
- TSError = False;
- ErrorMsg = "";
- TSSegs = 0;
- haveST = False;
- }
- /./ {
- if (haveST) {
- TransactionSetSegments += 1;
- } else {
- TransactionSetSegments = 0;
- }
- }
- /^GE/ {
- FGError = False;
- ErrorMsg = "";
- if (AckGroupCtlNbr != $3) {
- FGError = True;
- ErrorMsg = "The functional group control number in GE02 is " $3 ", but the value in GS06 is " AckGroupCtlNbr ".";
- }
- if (TransactionSetCount != $2) {
- if (FGError) {
- ErrorMsg = ErrorMsg "\n";
- }
- FGError = True;
- ErrorMsg = ErrorMsg "The actual number of transaction sets in functional group " AckGroupCtlNbr " does not match the value in GE01.";
- }
- if (FGError) {
- print("********* WARNING *********") >> OutputFile;
- print(ErrorMsg) >> OutputFile;
- print("This may indicate that the 999 document is corrupt.") >> OutputFile;
- print("********* WARNING *********") >> OutputFile;
- }
- FGError = False;
- ErrorMsg = "";
- AckGroupCtlNbr = "";
- TransactionSetCount = 0;
- }
- /^IEA/ {
- if (HaveTA1) {
- WriteTA1Data(TA101, TA102, TA103, TA104, TA104Desc, TA105, TA105Desc);
- }
- ICError = False;
- ErrorMsg = "";
- if (InterchgCtlNbr != $3) {
- ICError = True;
- ErrorMsg = "The interchange control number in IEA02 is " $3 ", but the value in ISA13 is " InterchgCtlNbr ".";
- }
- if (FunctionalGroupCount != $2) {
- if (ICError) {
- ErrorMsg = ErrorMsg "\n";
- }
- ICError = True;
- ErrorMsg = ErrorMsg "The actual number of functional groups in interchange " InterchgCtlNbr " does not match the value in IEA01.";
- }
- if (ICError) {
- if ((FunctionalGroupCount != 0) || ($2 != 1) || (!rejectedBatch)) {
- print("********* WARNING *********") >> OutputFile;
- print(ErrorMsg) >> OutputFile;
- print("This may indicate that the 999 or TA1 document is corrupt.") >> OutputFile;
- print("********* WARNING *********") >> OutputFile;
- }
- }
- ICError = False;
- ErrorMsg = "";
- InterchgCtlNbr = "";
- FunctionalGroupCount = 0;
- rejectedBatch = False;
- }
- function WriteTA1Data(TA101, TA102, TA103, TA104, TA104Desc, TA105, TA105Desc) {
- if (FunctionalGroupCount > 0) {
- print("----------------------------------------------") >> OutputFile;
- } else {
- WriteHeader();
- }
- if (TA104 == "R") {
- RejectWarning = " ** BATCH WAS REJECTED **";
- rejectedBatch = True;
- } else {
- RejectWarning = "";
- }
- print("Acknowledging Interchange") >> OutputFile;
- print(" Control Number: . . . . . " TA101) >> OutputFile;
- print(" Interchange Date: . . . . " substr(TA102,3,2) "/" substr(TA102,5,2) "/20" substr(TA102,1,2)) >> OutputFile;
- print(" Interchange Time: . . . . " substr(TA103,1,2) ":" substr(TA103,3,2)) >> OutputFile;
- print("\n Interchange Status:" RejectWarning) >> OutputFile;
- print(" " TA104Desc) >> OutputFile;
- if (TA105 != "") {
- print("\n Interchange Note:") >> OutputFile;
- print(" " TA105Desc) >> OutputFile;
- }
- HaveTA1 = False;
- }
- function WriteHeader() {
- if (!WroteHeader) {
- print("Sender: . . . . . . . . . . " SenderID "\t" SenderName[SenderID]) >> OutputFile;
- if (TestDocument) {
- print("Document Usage: . . . . . . TEST") >> OutputFile;
- }
- print("Receiver: . . . . . . . . . " ReceiverID) >> OutputFile;
- print("Interchange Number: . . . . " InterchgCtlNbr) >> OutputFile;
- if (PayerID > "") {
- print("Payer: . . . . . . . . . . . " PayerID "\t" PayerName[PayerID]) >> OutputFile;
- print("Process Date: . . . . . . . " ProcessDate) >> OutputFile;
- print("Process Time: . . . . . . . " ProcessTime) >> OutputFile;
- print("Acknowledgement") >> OutputFile;
- print(" Group Control Number: . . " AckGroupCtlNbr) >> OutputFile;
- }
- WroteHeader = True;
- }
- }
- function trim(InString) {
- gsub(/^ */, "", InString);
- gsub(/ *$/, "", InString);
- return InString;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement