3. Message Format and Structure

3.

Message Format and Structure

In NACCS, messages are transmitted in NACCS EDI standard format (NACCS EDI messages), MIME(Multipurpose Internet Mail Extensions) format (EDIFACT message and files attachment message) or
XML format. NACCS EDI messages are applicable to all procedures specified in the ProcedureSpecification and all management documents.

3.1

NACCS EDI Message

3.1.1

NACCS EDI Message Format

The NACCS EDI message format is a fixed-length delimiter format. This structure has two advantagesof being a fixed-length format, which is easily dealt with in systems, and of being a variable-length
format, which offers flexible system designs.
Note that most of the management documents, excluding some documents, are created in CSV
format.
For the output format for management documents, refer to "Appendix Table 6.9.2 List of Private
Management Document Information."
In addition, for details of the message format for management documents, refer to "6. Retrieval ofManagement Document Information."
In NACCS, CRLF should be used as the row delimiter. "CR" is hex '0D' while "LF" is hex '0A'.
For details, see "3.6 Codes".
Also note that in this Specification, <CRLF> denotes a CRLF, and △ denotes a one-byte space.

3.1.2

NACCS EDI message structure

A NACCS EDI message communicated between a user system and the NACCS Center server
consists of an "input (output) common fields" at the header part of the message and a "procedure-byprocedure field (including management document (CSV format))" at the data part.
The maximum message size allowable for NACCS EDI messages is 700,000 bytes.
Figure 3.1.1 shows the NACCS EDI message structure.
In actual message communications, additional segments such as a communications protocol header
are added to a NACCS EDI message.
Table 3.1.1 shows the maximum allowable message size transmitted to other relevant
ministers' systems.
Table 3.1.1

Maximum Allowable Message Size Transmitted to Other relevant Ministers' Systems
Maximum Message
SystemMessage TypeSize
Support system for crew
landing permission

Without attachment
files

700,000 bytes

With attachment files

10,700,000 bytes

3-1-1Communications protocol
Input
commonfield

Procedureby-procedure
field

Sent to NACCS
Center (processing
request message)

Max. 700,000 bytes (Note)

Communications protocol
OutputCommonField

Procedureby-procedure
field

Received from
NACCS Center(processing result
message)Max. 700,000 bytes (Note)

Figure 3.1.1

NACCS EDI Message Format(Note) For the maximum allowable message size transmitted to other relevant ministers' systems, refer
to Table 3.1.1.

3-1-2

3.1.2.1

Input Common Fields (Processing Request Message)

The input common fields have a 398 byte fixed-length. Note that the actual size including a two-bytedelimiter is 400 bytes. Attributes are One-byte alphanumeric characters and symbols. Table 3.1.2
shows the elements of the input common fields.
Table 3.1.2
Item
No.
1

Field namelengthInput Common Fields
OutlineSample Settings, etc.

Processing Control
Code3Enter spaces instead.

(Spaces must be entered)2

Procedure Code5

IDA (import declaration registration)

3(Reserved area)

21

Set a procedure code for identifying theprocedure.
Enter spaces instead. (Note 1)

4

User code

5

Set a user code, Identifying Numbers andpassword for identifying the user.

1AABC

5

Identifying Numbers

3

001

6

User Password

8********

7(Reserved area)

174

Enter spaces instead. (Note 1)(Spaces must be entered)8

Message Tag(Note 2)

26

9

(Reserved area)

8

Set information for matching a processing
request message with a processing result
message.
Enter spaces instead. (Note 1)

Assign a unique value.
When packaged software is used, Message Tag is
automatically set.
(Spaces must be entered)

10

Input Message ID(Note 2)

10This value will be output in a processing
result message.

Assigns an arbitrary value.

11

Index Tag
(Note 2)

100

This is used as a reference number when aprocessing result message exceeds thelimit and the message is divided intosequential stages (continued processing).

(When sequential processing is implemented, seta value as specified in Index Tag of the processing
result message that has arrived)

12(Reserved area)

1Enter spaces instead. (Note 1)(Spaces must be entered)

13

System Identifier

1

Specify classifications of procedures to be
implemented and systems. (Note 3)
For NACCS process, set either air or sea.
When carrying out other relevant ministers'
procedures: Specify information to classify
destinations of messages.

14(Reserved area)

27

Enter spaces instead. (Note 1)

15

Message Length

6This value indicates the size of the NACCS
EDI message.
(Including input common fields)
The NACCS Center computer
acknowledges the end of the message withthis value. The size of attachment files is
not included.

NACCS: (Air: 1 Sea: 2)
Support procedure to monitor imported foods: 4
Plant quarantine related procedures: 5
Animal quarantine related procedures: 6
Procedure for Trade Control: 7
Port related procedures: 8
Support system for crew landing permission: 9(Note 4)
(A space must be entered.)
When packaged software provided by NACCS isused, the first 3-digits are reserved for "Screen
Code".
000400 – 700000(Max 700,000)
Note: See the "3.1.2 the NACCS EDI message
structure Table 3.1.1" for maximum message
size allowable for communications between
other relevant ministries' systems.

16

Total

(Spaces must be entered)

398(Note 1) The reserved areas are used to control system.
(Note 2) See "3.5 Message control elements" for details on Message Tag, Input Message Id andIndex Tag.
(Note 3) For the user system (except EDIFACT users), refer to "Appendix Table 6.7 Subjected
Procedure List" to specify the system identifier according to procedure.
(Note 4) There is no occasion where users set this item. In response to the processing request
message of "Port related procedures: 8", "Support system for crew landing permission: 9" isspecified through procedure processing.
3-1-3

3.1.2.2

Rules on message format

3.1.2.2.1

Rules on message format for processing request messages

In text editor tool, etc., a text format NACCS EDI message (processing request message) isviewed as follows. (Protocol header and trailer fields are omitted.)
XXXXXXXXXXX.....XXX<CRLF>

Input common fields

XXXX...XXX<CRLF>

Procedure-by-procedure field 1

XXXX...XXX<CRLF>

Procedure-by-procedure field 2

XXXX...XXX<CRLF>

Procedure-by-procedure field …

XXXX...XXX<CRLF>

Procedure-by-procedure field n(1) For a blank field existing between two fields where values are entered, spaces must be
supplied in the blank field before transmission. (See "(Reference 1) Sample processing
request messages" (Case 1) below.)(2) After the last field where a value is entered, blank fields will not be filled with spaces fortransmission. (See "(Reference 1) Sample processing request messages" (Case 2, 3, 4
and 5) below.)(3) "-" is counted as part of a valid value of minus numbers.
Also, "." is counted as part of valid value of decimal numbers.
! When packaged software provided by NACCS Center is used, NACCS EDI messages areautomatically generated. Therefore, users do not need to be familiar with the message
format.

3-1-4

3.1.2.2.2

Rules on message format for processing result message

In text editor tool, etc., a text format NACCS EDI message (processing result message) is viewed
as follows. (Protocol header and trailer fields are omitted.)
XXXXXXXXXXX.....XXX<CRLF>

Output common fields

XXXX...XXX<CRLF>

Procedure-by-procedure field 1

XXXX...XXX<CRLF>

Procedure-by-procedure field 2

XXXX...XXX<CRLF>

Procedure-by-procedure field …

XXXX...XXX<CRLF>

Procedure-by-procedure field n(1) For a blank field existing between two fields where values are entered, spaces will be
supplied in the blank field before transmission. (See "(Reference 2) Sample processing
result messages" (Case 6) below.)(2) After the last field where a value is entered, blank fields will be filled with spaces fortransmission. (See "(Reference 2) Sample processing result messages" (Case 7 and 8)
below.)(3) If the message ends with a repeating group and no actual data is supplied in all repeatinggroup, all fields of the repeat information will be filled with spaces and transmitted as one
group. (See "(Reference 2) Sample processing result messages" (Case 9) below.)(4) If a group of repeat data exists at the end of a message, the last field of the group of repeat
data will be filled with spaces for transmission. (See "(Reference 2) Sample processing
result messages" (Case 10 and 11) below.)! Refer to sample processing result messages given in "(Reference 2) Sample processing
result messages".

3-1-5

(Reference 1) Sample processing request messages
The following shows various patterns of NACCS EDI messages (processing request
messages). Note that the input common fields are omitted from the following descriptions.
It is presumed that values in Fields 1 through 5 in Cases 1 through 5 are input left-aligned.
(Case 1) In a procedure requiring values in Input Fields 1 through 4, values are supplied onlyin Fields 1 and Fields 4
If Fields 1 through 4 require eight-digit values, and the value in Field 1 contains 'USA'
while that in Field 4 contains 'LA', the NACCS EDI message in text format is displayed asfollows on text editor tool, etc.:
USA<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2<CRLF>

Procedure-by-procedure field 3LA<CRLF>

Procedure-by-procedure field 4(Note:  denotes a one-byte space.)

In the above case, Fields 2 and 3, which are sandwiched between Fields where values
are supplied, need to be filled with spaces. Therefore, the size of this message is fixedwhether or not actual values are supplied in individual fields.
? Question
Why is it necessary to supply values of specific digits in Fields 2 and 3 when values
are supplied in Fields 1 and 4?
Answer
It is because NACCS EDI messages require a fixed-length delimiter format.
If Fields 2 and 3 are removed from the message for transmission, the message may
appear as invalid, or the server may wrongly recognize the value in Field 4 as thevalue in Field 2 in the server, resulting in a processing error.

3-1-6

(Case 2) In a procedure requiring values in Input Fields 1 through 4, values are supplied only in
Fields 1 and Fields 3
If Fields 1 through 4 require eight-digit values, and the value in Field 1 contains 'USA'
while that in Field 3 contains 'LA', the NACCS EDI message in text format is displayed asfollows on text editor tool, etc.:
USA<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2LA<CRLF>

Procedure-by-procedure field 3
Procedure-by-procedure field 4←not transmitted(Note:  denotes a one-byte space.)

If no field with a value in it exists after Field 4, no blank fields should be transmitted.

(Case 3) In a procedure requiring values in Input Fields 1 through 4, Field 3 is a field which
repeats (the number of repeats is 3):
If Fields 1 through 4 require five-digit values, and the value in Field 1 contains 'US', Field
3-(1) contains 'CA', Field 3-(2) contains 'NY' and Field 4 contains 'UK', the NACCS EDI
message in text format is displayed as follows on text editor tool, etc.:
US<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2CA<CRLF>

Procedure-by-procedure field 3-(1)NY<CRLF>

Procedure-by-procedure field 3-(2)<CRLF>

Procedure-by-procedure field 3-(3)UK<CRLF>

Procedure-by-procedure field 4(Note:  denotes a one-byte space.)

In the above case, even if only Fields 3-(1) and 3-(2) in the repeat group contain a value,
Field 3-(3) needs to be filled with spaces.
? Question
Why is it necessary to supply spaces for specific digits in Fields 2 and 3-(3) whenvalues are supplied in Fields 1, 3-(1), 3-(2) and 4?
Answer
It is because NACCS EDI messages require a fixed-length delimiter format.
If Fields 2 and 3-(3) are removed from the message for transmission, the message
may appear as invalid, or the server may wrongly recognize the order of the values in
Fields of 3-(1), 3-(2) and 4 as that of in Fields of 2, 3-(1) and 3-(3) in the server,
resulting in a processing error.

3-1-7

(Case 4) In a procedure requiring values in Input Fields 1 through 4, Field 4 is a field which
repeats (the number of repeats is 3):
If Fields 1 through 4 require five-digit values, and the value in Field 1 contains 'US', Field
4-(1) contains 'CA', and Field 4-(2) contains 'NY' (only two rounds to repeat available),the NACCS EDI message in text format is displayed as follows on the text editor tool,etc.:US<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2<CRLF>

Procedure-by-procedure field 3CA<CRLF>

Procedure-by-procedure field 4-(1)NY<CRLF>

Procedure-by-procedure field 4-(2)Procedure-by-procedure field 4-(3)  not transmitted(Note:  denotes a one-byte space.)(Case 5) In a procedure requiring values in Input Fields 1 through 5, Field 3, Fields 4 and 5 arefields to repeat (the number of repeats is 3):
If Fields 1 through 5 require five-digit values, and the value in Field 1 contains 'US', Field
3-(1) contains 'IN', Field 4-(1) contains 'CA', Field 5-(1) is 'NY', Field 3-(2) contains 'MI',and Field 4-(2) contains 'FL' (data is supplied up to 4-(2)), the NACCS EDI message intext format is displayed as follows on the text editor tool, etc.:
US<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2IN<CRLF>

Procedure-by-procedure field 3-(1)CA<CRLF>

Procedure-by-procedure field 4-(1)NY<CRLF>

Procedure-by-procedure field 5-(1)MI<CRLF>

Procedure-by-procedure field 3-(2)FL<CRLF>

Procedure-by-procedure field 4-(2)Procedure-by-procedure field 5-(2) ←not transmitted
Procedure-by-procedure field 3-(3) ←not transmitted
Procedure-by-procedure field 4-(3) ←not transmitted
Procedure-by-procedure field 5-(3) ←not transmitted(Note:  denotes a one-byte space.)

3-1-8

(Reference 2) Sample processing result messages
The following shows various patterns of NACCS EDI messages (processing result messages).
Note that the output common fields are omitted from the following descriptions.
It is presumed that values in Fields 1 through 9 in Cases 6 through 11 are output left-aligned.
(Case 6) In a procedure requiring values in Output Fields 1 through 4,
values are supplied only in Fields 1 and 4:a.
b.

Fields 1 through 4 require eight-digit values.
Fields 1 through 4 contain values for the common fields.
(Messages consist of the common fields only.)
A value in Field 1 is 'USA' and Field 4 is 'LA'.

c.

(Actual data are entered in fields up to the last field of the block of common fields.)
If a. through c. apply, the response processing result message (NACCS EDI message)in text format is displayed as follows on the text editor tool, etc.
USA<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2<CRLF>

Procedure-by-procedure field 3LA<CRLF>

Procedure-by-procedure field 4common fields(Note:  denotes a one-byte
space.)In the above case, Fields 2 and 3, which are sandwiched between Fields where values
are supplied, need to be filled with spaces. Therefore, the size of this message is fixedwhether or not actual values are supplied in individual fields.
? Question
Why is it necessary to supply values of specific digits in Fields 2 and 3 when values
are supplied in Fields 1 and 4?
Answer
It is because NACCS EDI messages require a fixed-length delimiter format. If Fields 2
and 3 are removed from the message for transmission, the message may appear as
invalid, or the server may wrongly recognize the value in Field 4 as the value in Field
2, resulting in a processing error.

3-1-9

(Case 7) In a procedure having Output Fields 1 through 4, values are supplied only in Fields 1
and 3:
a.
b.
c.

Fields 1 through 4 require eight-digit values.
Fields 1 through 4 contain values for the common fields.
(Messages consist of the common fields only.)
A value in Field 1 is 'USA' and Field 3 is 'LA'.

(A block of common fields ends with a blank field.)
If a. through c. apply, the response processing result message (NACCS EDI message) in
text format is displayed as follows on the text editor tool, etc.
USA<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2LA<CRLF>

Procedure-by-procedure field 3<CRLF>

Procedure-by-procedure field 4 ← transmittedcommon fields(Note:  denotes a one-byte space.)

If no field with a value in it exists after Field 4, the number of spaces specified in theProcedure Specification must be entered for the rest of the fields for transmission (i.e.
the end of the block of common fields).
In the above case, Field 2 sandwiched between fields where data is supplied and the lastField 4 both need to be filled with spaces. Therefore, the size of the massage is fixedwhether or not actual data are entered in individual fields.
As for Message Type [R] (processing result notification messages and output error
messages for screen) and Message Type [U] (messages for storage), only fields withactual values will be sent. In the above case, therefore, only Fields 1 to 3 will be sent.
See "3.4 Message Types" for message types.

3-1-10(Case 8) In a procedure having Output Fields 1 through 4, Field 3 consists of repeating groups(the number of repeats is 3):
a. Fields 1 through 4 require five-digit values.
b. Fields 1 through 4 contain values for the common fields.
(Messages consist of the common fields only.)c. Field 1 is 'US' and Field 2 is 'CA'.
(Repeating groups of data exist in the common fields, and the repeating groups ofcommon fields end with a blank field.)
If a. through c. apply, the response processing result message (NACCS EDI message) in
text format is displayed as follows on the text editor tool, etc.
US<CRLF>

Procedure-by-procedure field 1CA<CRLF>

Procedure-by-procedure field 2<CRLF>

Procedure-by-procedure field 3-(1)← transmitted<CRLF>

Procedure-by-procedure field 3-(2) ← transmitted<CRLF>

Procedure-by-procedure field 3-(3) ← transmitted<CRLF>

Procedure-by-procedure field 4common fields← transmitted(Note:  denotes a one-byte space.)

If no field with a value in it exists after Field 4, the number of spaces specified in theProcedure Specification must be entered for the rest of the fields for transmission (i.e.
the end of the block of common fields).
As for Message Type [R] (processing result notification messages and output error
messages for screen) and Message Type [U] (messages for storage), only fields withactual values will be sent. In the above case, therefore, only Fields 1 to 2 will be sent.
See "3.4 Message Types" for message types.

3-1-11

(Case 9) In a procedure having Output Fields 1 through 4, Field 4 consists of repeating groups(the number of repeats is 3):
a.
b.
c.

Fields 1 through 4 requires five-digit values.
Fields 1 through 3 contain values for common fields and Field 4 consists ofrepeating groups.
A value in Field 1 is 'US' and that of Field 2 is 'NY'.

(The message ends with a repeating group and no actual data is supplied in all
repeating groups.)
If a. through c. apply, response processing result message (NACCS EDI message) in
text format is displayed as follows on text editor tool, etc.
US<CRLF>

Procedure-by-procedure field 1NY<CRLF>

Procedure-by-procedure field 2common fields<CRLF> Procedure-by-procedure field 3<CRLF> Procedure-by-procedure field 4-(1)← transmitted

repeating group

Procedure-by-procedure field 4-(2)← not transmitted

repeating group

Procedure-by-procedure field 4-(3)← not transmitted

repeating group(Note:  denotes a one-byte space.)

If the message has no actual data supplied in repeating groups at the end of the message,
Field 4 up to
the last field of the first block of repeating data need to be filled with spaces fortransmission.
However, if blank fields are to be output, only common fields of Fields 1 to 3 will be output.
As for Message Type [R] (processing result notification messages and output error
messages for screen) and Message Type [U] (messages for storage), fields up to the last
field of the group of fields, where actual values are entered, will be sent. In the above case,therefore, only Fields 1 and 2 will be sent.
See "3.4 Message Types" for message types.

3-1-12

(Case 10) In a procedure having Output Fields 1 through 5, Fields 3 to 5 are repeating groups(the number of repeats is 3):
a.
b.
c.

Fields 1 through 5 require five-digit values.
Fields 1 and 2 contain values for common fields and Fields 3 to 5 are repeatinggroups.
A value in Field 1 is 'US', Field 3-(1) is 'IN', Field 4-(1) is 'CA', Field 5-(1) is 'NY',
Field 3-(2) is 'MI', and Field 4-(2) is 'FL'.

(The message ends with a block of repeating fields, and no actual data is supplied until
the end of a block of the repeating field groups.)
If a. through c. apply, response processing result message (NACCS EDI message) in
text format is displayed as follows on text editor tool, etc.
US<CRLF>

Procedure-by-procedure field 1

common fields<CRLF>

Procedure-by-procedure field 2IN<CRLF>

Procedure-by-procedure field 3-(1)CA<CRLF>

Procedure-by-procedure field 4-(1)NY<CRLF>

Procedure-by-procedure field 5-(1)MI<CRLF>

Procedure-by-procedure field 3-(2)FL<CRLF>

Procedure-by-procedure field 4-(2)<CRLF>

Procedure-by-procedure field 5-(2)← transmitted

Procedure-by-procedure field 3-(3)← not transmitted

Procedure-by-procedure field 4-(3)← not transmitted

Procedure-by-procedure field 4-(3)← not transmitted

repeating grouprepeating grouprepeating group(Note:  denotes a one-byte
space.)

If the message has a block of repeating fields at the end of the message, fields up to thelast field of the block of repeating fields need to be filled with spaces for transmission.
As for Message Type [R] (processing result notification messages and output error
messages for screen) and Message Type [U] (messages for storage), fields up to thelast field of the group of fields, where actual values are entered, will be sent. In the above
case, therefore, only fields up to 4-(2) will be sent.
See "3.4 Message Types" for message types.

3-1-13

(Case 11) In a procedure having Output Fields 1 through 9, Fields 4 and 8 consist of repeatinggroups (the number of repeats is 3):
a.
b.
c.

Fields 1 through 9 require five-digit values.
Fields 1 through 5 contain values for common fields, andFields 6 through 9 contain values for a repeating group.
A value in Field 1 is 'US', Field 3 is 'IN',
Field 4-(1) is 'CA', Field 4-(2) is 'NY',
Field 01-6 is 'MI', Field 01-7 is 'FL', andField 01-8-(1) is 'OR'.

(The message ends with a block of repeating fields, and no actual data is supplied until
the end of a block of the repeating field groups.)
If a. through c. apply, response processing result message (NACCS EDI message) in
text format is displayed as follows on text editor tool, etc.
US<CRLF>

Procedure-by-procedure field 1<CRLF>

Procedure-by-procedure field 2IN<CRLF>

Procedure-by-procedure field 3CA<CRLF>

Procedure-by-procedure field 4-(1)NY<CRLF>

Procedure-by-procedure field 4-(2)<CRLF>

Procedure-by-procedure field 4-(3)<CRLF>

Procedure-by-procedure field 5MI<CRLF>

Procedure-by-procedure field 01-6

← transmittedFL<CRLF>

Procedure-by-procedure field 01-7

← transmittedOR<CRLF>

Procedure-by-procedure field 01-8-(1)← transmitted repeating group<CRLF>

Procedure-by-procedure field 01-8-(2)← transmitted<CRLF>

Procedure-by-procedure field 01-8-(3)← transmitted<CRLF>

Procedure-by-procedure field 01-9

← transmitted

Procedure-by-procedure field 02-6

← not transmitted

Procedure-by-procedure field 02-7

← not transmittedcommon fields

Procedure-by-procedure field 02-8-(1) ← not transmitted repeating group
Procedure-by-procedure field 02-8-(2) ← not transmitted
Procedure-by-procedure field 02-8-(3) ← not transmitted
Procedure-by-procedure field 02-9

← not transmitted(Note:  denotes a one-byte
space.)

If the message has a block of repeating fields at the end of the message, fields up to thelast field of the block of repeating fields need to be filled with spaces for transmission.
As for Message Type [R] (processing result notification messages and output error
messages for screen) and Message Type [U] (messages for storage), fields up to thelast field of the group of fields, where actual values are entered, will be sent. In the above
case, therefore, only fields up to 01-8-(1) will be sent.
See "3.4 Message Types" for message types.
3-1-14

3.1.2.3

Data entry rules for procedure-by-procedure fields

The NACCS EDI message format is a fixed-length delimiter format (except for most of the
management documents in CSV format), each field has a fixed-length.
Table 3.1.3 gives data entry rules / data entry conditions for procedure-by-procedure fields:

Field

Table 3.1.3 Data Entry Rules for procedure-by-procedure fields
NotionAttribute
FormatInput ConditionsnOne-byte
Right-align Although a value with less digits than
numeric
specified can also be entered, missing
characters
digits must be filled with one byte spaces.
anProcedure-byprocedure field(individual
procedures andfields are defined on sn
a procedure-byprocedure basis in
the ProcedureSpecification.)j

One-byte
Left-alignalphanumericcharacters andsymbols* Lowercase
letters are notallowed.
One-byte
Left-alignalphanumericcharacters andsymbols* Lowercase
letters areallowed.
Two-byte
Left-aligncharacters, onebytealphanumericcharacters andsymbols

Although a value with less digits thanspecified can also be entered, missing
digits must be filled with one byte spaces.

Although a value with less digits thanspecified can also be entered, missing
digits must be filled with one byte spaces.

Although a value with less digits thanspecified can also be entered, missing
digits must be filled with one byte spaces.

! Packaged software provided by NACCS Center automatically formats messages (by adding
necessary spaces) when a value with less digits than specified is entered.

Example 1: One of the following settings applies when '12.3' is entered under the following
conditions: "up to the second decimal place", "right align" and "attributes n8":(1) １２．３(2) １２．３０(Note:  denotes a one-byte space.)
Example 2: One of the following settings applies when '12.00' is entered under the same conditions
as above:(1) １２(2) １２．０(3) １２．００(Note:  denotes a one-byte space.)
3-1-15

3.1.2.4

Output common fields (processing result messages)

Values for output common fields have a 398 byte length in total. Note that including the two-byte
fixed delimiter for output common fields, the total length of values comes to 400 bytes. Attributeare One-byte alphanumeric characters and symbols.
Tables 3.1.4 shows fields processed in interactive processing mode (packaged software), while
Table 3.1.5 shows fields processed in interactive processing mode (SMTP two-way or ebMS) or email style processing mode (gateway computers).

3-1-16

Table 3.1.4

Output Common Fields(For interactive processing mode (with packaged software))

Item
No.
1
2

Field namelength(Reserved area)
Procedure Code3
5

(Note 1)
Indicates a procedure code (Note 2)

3

Output Information
code

7

4

Date of Message
Receipt
User code

14

The code of an output message is
specified.
Advisable to use this code for sorting
messages.
The date of receipt of a message(yyyymmddhhmm)
The code of the user who received therelevant message

5

6
7

5

Outline116

8
9(Reserved area)
Logical Terminal
Name(Reserved area)
Subject

10(Reserved area)40(Note 1)11

Message Tag

26

Used to identify a series of processing
result messages responding to aprocessing request message.
(See 3.5.2)
Used to identify a series of processing
result messages responding to aprocessing request message.
Used to identify a series of processing
result messages responding to aprocessing request message.
Indicates a message type.
(See 3.4)(Note 1)

13

14
15

Message Control
Information

12

64
64

Division
Sequence
NumberTermination

3

Message Type

1

(Reserved area)

3

1(Note 1)
Indicates the name of the logicalterminal of the output destination(Note 1)
Procedure-by-procedure data (e.g.,customs declaration number)

Sample Settings, etc.

IDA△△ (import declaration registration)
AAE0010*AIDA

201812101430
1AABC(If a user code of output destination isregistered in the Destination Control field, theuser code is set.)

1ABC1C

10123456710...

000 - 001

'E' is supplied at the end of the message.
Otherwise, enter a space.
'R' is supplied for a processing result
message.

16

Input Message Id

10Outputs all settings of the processing
request message. For EXC typemessages, spaces are filled.

(Settings of a processing request
massage)17

Index Tag

100

(Subsequent information)

18

Message Destination
Control Format

1

Set when inquiry results do not fit in asingle processing result message(subsequent processing to follow)
The message destination control
format(See 5.1)

19(Reserved area)

28(Note 1)20

Message Length

6

Indicates the length of the NACCS EDI
message.

INQ type: 'Q'
EXZ type: 'Z'
EXC type: 'C'
Management documents: 'K'

000400 - 700000(Max: 700,000)
Note: Refer to "3.1.2 NACCS EDI message
structure Table 3.1.1" for the maximum
allowable message size transmitted to otherrelevant ministers' systems.

21

Total

398

(Note 1) The reserved areas are used to control system.
(Note 2) The Procedure Code set in output common fields may not necessarily match that in other input common fields.
The Procedure Code in an output common field may be different from a value specified in the corresponding processing
request message, or an irregular character string (including space) may be set. When storing a message, it is advisable toidentify the Output Information Code, Message Tag or Input Message Id.

3-1-17

Table 3.1.5

Output Common Fields(For the interactive processing mode (SMTP two-way or ebMS processing mode)
Item
No.
1
2

Field nameor e-mail style processing mode (gateway computer))lengthOutlineSample Settings, etc.

(Reserved area)
Procedure Code3
5

(Note 1)
Indicates a procedure code (Note 2)

3

Output Informationcode

7

The code of an output message.
Advisable to use this code for sorting
messages.

AAE0010*AIDA

4

Date of Message
Receipt

14

The date of receipt of a message(yyyymmddhhmm)

201812101430

5

User code

5

The code of the user who received therelevant message

1AABC

6
7

(Reserved area)
User's E-Mail
Address

17
64

8

Subject

64

9(Reserved area)40(Note 1)10

Message Tag

26

Used to identify a series of processing
result messages responding to aprocessing request message.
(See 3.5.2)
Used to identify a series of processing
result messages responding to aprocessing request message.
Used to identify a series of processing
result messages responding to aprocessing request message.

12

13
14

Division
Sequence
NumberTermination

3

Message Type1

Indicates a message type.
(See 3.4)

Message Control
Information

11(Note 1)Same value as specified in To field in the
SMTP header(when using a mail protocol)
Procedure-by-procedure data (e.g.,customs declaration number)

1

IDA (import declaration registration)(If a user code of output destination isregistered in the Destination Control field, theuser code is set.)

ABC001@XXX...

10123456710...

000 - 001

'E' is supplied at the end of the message.
Otherwise, enter a space.
'R' is supplied for a processing result
message.

3(Note 1)

15

(Reserved
area)
Input Message Id

10Outputs all settings of the processing
request message. For EXC typemessages, spaces are filled.

(Settings of a processing request
massage)16

Index Tag

100

Set when inquiry results do not fit in asingle processing result message(subsequent processing to follow)(Subsequent information)

17

Message Destination
Control Format

1

The message destination control format(See 5.1)

INQ type: 'Q'
EXZ type: 'Z'
EXC type: 'C'
Management documents: 'K'

18(Reserved area)

28(Note 1)19

Message Length

6

Indicates the length of the NACCS EDI
message.

000400 - 700000(Max: 700,000)
Note: See the "3.1.2 NACCS EDI message
structure Table 3.1.1" for maximum
message size allowable forcommunications between other relevant
ministries' systems.

20

Total

398

(Note 1) The reserved areas are used to control system.
(Note 2) The Procedure Code set in output common fields may not necessarily match that in other input common fields.
The Procedure Code in output common fields may be different from a value specified in the corresponding processing
request message, or an irregular character string (including space) may be set. When storing a message, it is advisable toidentify the Output Information Code, Message Tag or Input Message Id.

3-1-18