0

我收到以下格式的 Coplat 消息

DEB1234567890    5   CODE1     5   2007020610471COPLAT0
(... other data here ....)

DEB1234567890    5   CODE2     5   2007020610471COPLAT0
(... other data here ....)

FIN00000245     

如您所见,上面的消息有两个 DEB 部分。

我想创建一个可以映射到该 Coplat 消息的 Copaym 消息,这是带有一个 BGM 段的 Copaym 消息的示例。

UNB+UNOC:2+1234567890:5+CODE1'
UNH+1000000+COPAYM:0:4.2:RT'
BGM+903:ZZZ+1000000'
    (... other data here ....)
UNT+62:1000000'
UNZ+2+091000000'

我想创建两条像这样的消息来翻译成上面的 Coplat 消息,这意味着在翻译时,我必须分别获得 2 个带有 CODE1 和 CODE2 的 DEB 部分,我试过这个:

UNB+UNOC:2+1234567890:5+CODE1'
UNH+1000000+COPAYM:0:4.2:RT'
BGM+903:ZZZ+1000000'
    (... other data here ....)
UNT+62:1000000'
UNZ+2+091000000'

UNB+UNOC:2+1234567890:5+CODE2'
UNH+1000000+COPAYM:0:4.2:RT'
BGM+903:ZZZ+1000000'
    (... other data here ....)
UNT+62:1000000'
UNZ+2+091000000'

但是我遇到了语法错误,所以我将所有数据放在一个可以工作的 UNB 段中,但是生成的 Coplat 只有一个带有 CODE1 的 DEB,这是消息:

UNB+UNOC:2+1234567890:5+CODE1'
UNH+1000000+COPAYM:0:4.2:RT'
BGM+903:ZZZ+1000000'
    (... other data here ....)
UNT+62:1000000'

UNH+1000000+COPAYM:0:4.2:RT'
BGM+903:ZZZ+1000000'
    (... other data here ....)
UNT+62:1000000'
UNZ+2+091000000'

内部有 1 个 UNB 和 2 个 UNH 段。任何人都可以帮助如何制作 Copaym 消息,以便我获得 2 个带有 CODE1 和 CODE2 的 DEB 段吗?

4

1 回答 1

0

这是正确的格式,您只需为两条消息指定不同的交换标识符

UNB+UNOC:2+1234567890:5+CODE1'
UNH+1000000+COPAYM:0:4.2:RT'
BGM+903:ZZZ+1000000'
    (... other data here ....)
UNT+62:1000000'
UNZ+2+091000000'

UNB+UNOC:2+1234567890:5+CODE2'
UNH+1000000+COPAYM:0:4.2:RT'
BGM+903:ZZZ+1000000'
    (... other data here ....)
UNT+62:1000000'
UNZ+2+091000000'
于 2009-08-10T16:03:32.113 回答