X12MetaData

This is a template that is used to create TPS procedures to put the correct user-defined metadata on a message.

Note:  If the splitX12 procedure was used, then the metadata fields have already been populated. The X12MetaData template can be used to change values before building the outbound message, if necessary.

X12MetaData is used in the outbound TPS before joinX12, and:

  • Tests non-X12 to X12 translations.
  • Formats fields set by the user.
  • Keeps the current value from user-defined metadata if the field is not formatted by the user.
  • Uses a default value if the field is not defined by the user or by user-defined metadata.

Fields are commented to indicate their purpose.

When using this template, remember these points:

  • To set one of the GS or ISA fields, uncomment the corresponding set command and fill in your value.
  • If you do not set a GS or ISA field and your message has a value assigned in user-defined metadata, then the message value is used.
  • If you do not set a value and your message has no user-defined metadata, then the default value is used.
  • If you are translating from version 3020 to 4010, then the user-defined metadata is filled in by splitX12 on the inbound side.
  • When you build the interchange, set the ISA version number to 00401 and the GS version to 004010.

All other values are the same as the inbound message.

If your message is split at the group level, then the group user-defined metadata is not used by joinX12. The GS and GE are translated as normal segments in the message. They are part of the message data. Therefore, any GS values that are set in X12MetaData procs do not have any effect.