我有以下格式的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个DEB切片用CODE1和CODE2 respectivily,我试图这样:

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只有一个DEB与CODE1,这是消息:

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'

一UNB和2 UNH段内部。 谁能帮助如何使Copaym消息,所以我得到2个DEB段与CODE1和CODE2?

有帮助吗?

解决方案

这是正确的格式,你刚才指定的两个消息不同的交汇处identifires

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'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top