read999s()
read999s(
document):object[]
Defined in: packages/parser/src/profiles/acknowledgements/999/reader.ts:257
Reads every 999 in a document, in the order they appear.
Parameters
| Parameter | Type | Description |
|---|---|---|
document | X12Document | The result of readX12. |
Returns
object[]
Each acknowledgment with the interchange and functional group it came from.
Example
ts
import { readX12 } from '@ediocracy/parser';
import { read999s } from '@ediocracy/parser/acknowledgements';
for (const { response } of read999s(readX12(text))) {
for (const set of response.transactionSets) {
console.log(set.controlNumber, set.result?.code);
}
}