About consumer file structures

A consumer file structure contains a description of the basic content structure and naming conventions of a file. A consumer file structure specifies the type of file that consumers expect from Sterling File Gateway. A file structure is an ordered list of file layers, from outside to inside. The layers are of a certain type and they can have a specific format pattern and can include unique parameters.

The Integration Architect must create a consumer file structure when creating a delivery channel.

To create a file structure with multiple file layers, the outside layer must be a container layer of one of the following types:
  • ZIP
  • GZIP
  • PGP
The innermost layer of a producer file structure must be a non-container layer of one of the following types:
  • TEXT
  • Unknown
If the layer type of the consumer file structure is text, the layer types of every producer file structure must:
  • Be text
  • Must not be unknown
If the layer type of the consumer file structure is unknown, the producer file structure can be either unknown or text.

For each layer, the file name format pattern is used to generate the new file name. The file name format pattern uses system, custom, or provisioning facts to define how the consumer file is named. The following system facts can be used in building the file name format pattern:

Fact Name Description When Derived
ConsumerFilename The name of the ultimate consumer file During routing channel identification or as the result of a consumer identification business process
ConsumerName The name of the consumer partner During routing channel identification or as the result of a consumer identification business process
ConsumerCode The code of the consumer partner
Note: The ConsumerCode can the same as the ConsumerName, or different. The ConsumerCode is derived from the consumer partner name, except that:
  • Characters are truncated if the partner name exceeds 24 characters
  • Characters are replaced if the partner name includes characters that are not alphanumeric
  • Characters are removed if the partner name includes one or more spaces
During routing channel identification or as the result of a consumer identification business process
ProducerFilename The name of the file that the producer sent During early routing channel identification
ProducerName The name of the producing partner During early routing channel identification
ProducerCode The code of the producing partner
Note: The ProducerCode can be the same as the ProducerName, or can be different. The ProducerCode is derived from the producing partner name, except that:
  • Characters are truncated if the partner name exceeds 24 characters
  • Characters are replaced if the partner name includes characters that are not alphanumeric
  • Characters are removed if the partner name includes one or more spaces
During early routing channel identification
RoutingTimestamp Date and time when the producer file was received by the consumer. A 17-digit string consisting of a 4-digit year, 2-digit month, 2-digit day, 3-digit minute, 3-digit second, and 3-digit millisecond. For example,
20090813142111920
Note: The RoutingTimestamp format for file names and mailboxes is restricted so that the generated file name is legal. Characters from literal text, text fact values, and formatted timestamp fact values must be valid.

For example, the format string: ${tH':'M:RoutingTimestamp} is a legal format, but produces an invalid name, because it produces a name like 05:23. Colons are not allowed. Do not use any delimiter in the timestamp. For example, tYmd, HMSL is not valid.

Producer file arrival time
ConsumerPgpExtension The extension of a file based on the consumer's PGP preferences. Only available for the PGP file layer type.
Value=
  • .pgp - consumer prefers a PGP file
  • .asc - consumer prefers an ASCII encoded pgp file
  • (blank) - consumer does not prefer a PGP file
PGP layer packaging time

If custom facts are used, they must exactly match the custom facts specified in the producer file structure. If provisioning facts are used, they must exactly match the provisioning facts as specified on the Provisioning Facts tab of the Routing Channel Template creation wizard. If the value discovered for the provisioning fact at route execution time contradicts the value given at routing channel creation time, the route fails.

In the following example, the file name format pattern uses both system and custom facts:

${mySanitizedFilename}_${tYmdHMSL:RoutingTimestamp}.zip

In this example, "mySanitizedFilename" was defined as a custom fact in the producer file structure, and "RoutingTimestamp" is a system fact. When Sterling File Gateway receives the file, the facts are derived and used to determine the values to place in the consumer file name.