Skip to content

Skip TA1 segment when checking interchange version - #80

Open
AbhinavMir wants to merge 1 commit into
imsweb:masterfrom
AbhinavMir:fix-999-ta1-version-check
Open

AbhinavMir wants to merge 1 commit into
imsweb:masterfrom
AbhinavMir:fix-999-ta1-version-check

Conversation

@AbhinavMir

@AbhinavMir AbhinavMir commented Jun 16, 2026 •

Copy link
Copy Markdown

No description provided.

The version check read the segment immediately following ISA and treated
its last element as the GS08 version. When a TA1 interchange acknowledgement
segment appears between ISA and GS, the check read TA1 instead of GS and
failed with 'ANSI version 000 not consistent with version specified ...',
aborting the parse.

Scan forward past any interchange-level segments (such as TA1) to the GS
segment before reading the version. Adds a 999 test file with a TA1 segment.
@ctmay4

ctmay4 commented Jun 17, 2026

Copy link
Copy Markdown
Member

@angelaszek can you please take a look?

@ctmay4
ctmay4 requested a review from angelaszek June 17, 2026 12:08
@ctmay4

ctmay4 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Please merge master into this branch to fix build errors.

@angelaszek

Copy link
Copy Markdown
Collaborator

It looks like we read the whole file to see if we find the GS segment. I think it would be better to see if the second segment starts with TA1 and, if it does, move to the next segment and process it as if it were GS. There is a check if the version is valid at the end to help catch bad segments that should be GS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants