create CONTROL()

This function creates an EDIFACT CONTRL message (a response to the EDIFACT communication as such) and calls another profile that will process the generated message (in general the transfer). The type of start of the profile can be set using b. sync lets the calling profile wait for the end of the called profile, async leads to the continuing of the current profile's mapping.


The CONTRL message's Message Identifier is set in c, the Sender ID or the original message in d and the Recipient ID of the original message in e. Parameter f is the Message Identifier of the message this CONTRL message refers to, and g is the Action Identifier of the global UCI segment. The response works with Action Code and optional Syntax Codes. Action Code 7 means accepted, Code 4 means rejected. If a transfer has been rejected, an additional code and the name of the segment can be given to allow a more detailed explanation. E.g. 'missing UNH' can be coded as 4+13+UNH (4=rejected, 13=missing, UNH=Segment identifier). An Action Code 8 means that the message has been received but no syntax check has happened, yet. This can/must be done in another CONTRL message.

Additional segments (e.g. UCM) are passed with h as text. The single elements already have to be separated by the standard EDIFACT segment-separator (').

Available error codes for UC* segments


The following error codes can be used in segments like UCM.


Code

Error message

Meaning

2

Syntax version or level not supported

Notification that the syntax version and/or level is not supported by the recipient.

7

Interchange recipient, not actual recipient

Notification that the Interchange recipient (S003) is different from the actual recipient.

12

Invalid value

Notification that the value of a simple data element, composite data element or component data element does not conform to the relevant specifications for the value.

13

Missing

Notification that a mandatory (or otherwise required) service or user segment, data element, composite data element or component data element is missing

14

Value not supported in this position

Notification that the recipient does not support the use of the specific value of an identified simple data element, composite data element or component data element in the position where it is used. The value may be valid according to the relevant specifications and may be supported if it is used in another position.

15

Not supported in this position

Notification that the recipient does not support the use of the segment type, simple data element type, composite data element type or component data element type in the specific in the identified position.

16

Too many constituents

Notification that the identified segment contained too many data elements or that the identified composite data element contained too many component data elements.

17

No agreement

No agreement exists that allows receipt of an interchange, functional group or message with the value of the identified simple data element, composite data element or component data element.

18

Unspecified error

Notification that an error has been identified, but the nature of the error is not reported.

19

Invalid decimal notation

Notification that the character indicated as decimal notation in UNA is invalid or the decimal notation used in a data element is not consistent with the one indicated in UNA.

20

Character invalid as service character

Notification that a character advised in UNA is invalid as service character.

21

Invalid character(s)

Notification that one or more character(s) used in the interchange is not a valid character as defined by the syntax level indicated in UNB. The invalid character is part of the referenced level or followed immediately after the identified part of the interchange.

22

Invalid service character(s)

Notification that the service character(s) used in the interchange is not a valid service character as advised in UNA or not one of the service characters in the syntax level indicated in UNB or defined in an interchange agreement. If the code is used in UCS or UCD, the invalid character followed immediately after the identified part of the interchange.

23

Unknown Interchange sender

Notification that the Interchange sender (S002) is unknown.

24

Too old

Notification that the received interchange or functional group is older than a limit specified in an IA or determined by the recipient.

25

Test indicator not supported

Notification that a test processing could not be performed for the identified interchange, functional group or message.

26

Duplicate detected

Notification that a possible duplication of a previously received interchange, functional group or message has been detected. The earlier transmission may have been rejected.

27

Security function not supported

Notification that a security function related to the referenced level or data element is not supported.

28

References do not match

Notification that the control reference in UNB/UNG/UNH does not match the one in UNZ/UNE/UNT.

29

Control count does not match number of instances received

Notification that the number of functional groups/messages/segments does not match the number given in UNZ/UNE/UNT.

30

Functional groups and messages mixed

Notification that individual messages and functional groups have been mixed at the same level in the interchange.

31

More than one message type in group

Notification that different message types are contained in a functional group.

32

Lower level empty

Notification that the interchange did not contain any messages or functional groups or a functional group did not contain any messages.

33

Invalid occurrence outside message or functional group

Notification that an invalid segment or data element occurred in the interchange, between messages or between functional groups. Rejection is reported at the level above.

34

Nesting indicator not allowed

Notification that explicit nesting has been used in a message where it shall not be used.

35

Too many segment repetitions

Notification that a segment was repeated too many times.

36

Too many segment group repetitions

Notification that a segment group is repeated too many times.

37

Invalid type of character(s)

Notification that one or more numeric characters were used in an alphabetic (component) data element or that one or more alphabetic characters were used in a numeric (component) data element.

38

Missing digit in front of decimal sign

Notification that a decimal sign is not preceded by one or more digits.

39

Data element too long

Notification that the length of the data element received exceeded the maximum length specified in the data element description.

40

Data element too short

Notification that the length of the data element received is shorter than the minimum length specified in the data element description.

41

Permanent communication network error

Notification that a permanent error was reported by the communication network used for transfer of the interchange. Re-transmission of an identical interchange with the same parameters at network level will not succeed.

42

Temporary communication network error

Notification that a temporary error was reported by the communication network used for transfer of the interchange. Re-transmissions of an identical interchange may succeed.

43

Unknown interchange recipient

Notification that the interchange recipient is not known by a network provider.

Parameters


Parameter

Description

a

Name of the profile (with input type Message) that is started after the creation of the CONTRL message.

b

(optional) Type of call to start the profile. Possible values are sync or async. Default: sync

c

Message Identifier (added to UNB).

d

Sender ID of the original message.

e

Recipient ID of the original message.

f

Message Identifier of the original message.

g

Action Code for the UCI segment.

h

Text containing additional segments (e.g. UCM) separated by '

Examples


The current date of this example is 2011-09-06 08:20:23. The incoming message does not contain any documents.


UNA:+.? '
UNB+UNOC:3+SENDERID:14+RECEIVERID:14+110905:1109+27'
UNZ+1+27'

Parameter a

b

c

d

e

f

g

h

Result

NextProfile

sync

CONTRLID

SENDERID

RECEIVERID

27

4+13+UNH


true if the called profile finished successfully, otherwise false.

The called profile receives the following CONTRL message:


UNB+UNOC:2+RECEIVERID+SENDERID+110906:0820+CONTRLID'
UNH+1+CONTRL:D:3:UN'
UCI+27+SENDERID+RECEIVERID+4+13+UNH'
UNT+3+1'
UNZ+1+CONTRLID'


The incoming message contains documents, some of which were rejected.


UNA:+.? '
UNB+UNOC:3+SENDERID:14+RECEIVERID:14+110905:1109+27'
UNH+1+IFTSTA:D:01B:UN'
...
UNT:10+1'
UNH+2+IFTSTA:D:01B:UN'
...
UNT:10+2'
UNH+3+IFTSTA:D:01B:UN'
...
UNT:10+3'
UNZ+1+27'

Parameter a

Parameter b

Parameter c

Parameter d

Parameter e

Parameter f

Parameter g

Parameter h

Result

NextProfile

async

CONTRLID

SENDERID

RECEIVERID

27

7

UCM+1+IFTSTA:D:01B:UN+4+18'

UCM+2+IFTSTA:D:01B:UN+7'

UCM+3+IFTSTA:D:01B:UN+7'

Always true, since the profile has been called asynchronously.

The values of parameter h are in multiple lines to increase readability, the line breaks must not be used. The called profile receives the following CONTRL message.


UNB+UNOC:2+RECEIVERID+SENDERID+110906:0820+CONTRLID'
UNH+1+CONTRL:D:3:UN'
UCI+27+SENDERID+RECEIVERID+7'
UCM+1+IFTSTA:D:01B:UN+4+18'
UCM+2+IFTSTA:D:01B:UN+7'
UCM+3+IFTSTA:D:01B:UN+7'
UNT+6+1'
UNZ+1+CONTRLID'