Line Ending and Publish To Account

The following topics provide the overview, prerequisites, configuration steps, and flow of events for the Line Ending and Publish To Account use case:

Related topics:


Transform end-of-line characters of each incoming file and publish the file to the local account.



Step to configure the flow

  1. Create and configure a subscription to the Advanced Routing application by navigating to the account’s Subscriptions tab and clicking the Subscribe… button. For Advanced Routing subscription configuration details, refer to Subscribe to Advanced Routing application.
    1. Configure the subscription folder.
    2. (Optional) Configure the rest of the settings.
    3. Click Add when done.
  2. Navigate to the Routes tab of the created account and assign a new route package to the account by choosing the created Route Package Template and clicking the Assign Route button. For assigning a route configuration details, refer to Assign Route Package Template.
  3. Assign the subscription to the new route package by selecting Assign in the Subscriptions pane and selecting the subscription created in Step 1.
  4. Create a new route by clicking the New Route button in the Specific Settings pane. For route configuration details, refer to New Route.
    1. Configure the new route’s name and (optionally) description.
    2. Add and configure a Line Ending step by selecting it from the -- Select Step -- drop-down menu and clicking the Add Step button. For Line Ending configuration details, refer to Line Ending.
      1. Select the source line ending format (for example, Custom -> \u0025 for Mainframe end-of-line characters).
      2. Select source file encoding (for example, X-ORACLE-WE8EBCDIC500).
      3. Select target line ending format (for example, Linux(LF)).
      4. Select target file encoding (for example, US-ASCII).
      5. (Optional) Configure the rest of the options.
      6. Click Save when done.
    3. Add and configure a Publish to Account step by selecting it from the -- Select Step -- drop-down menu and clicking the Add Step button. For Publish To Account configuration details, refer to Publish To Account.
      1. Uncheck Proceed with route execution on step failure.
      2. Select an account to publish to (for example, the current account).
      3. Select a folder to publish the file to (for example, the subscription folder configured in Step 1).
      4. Enter the following expression in the Publish file as field:
      5. ${basename(}.us-ascii${extension(}
      6. This expression transforms the original file name by adding .us-ascii before the filename extension. For example, for file incoming.txt the result is
      7. (Optional) Configure the rest of the settings.
      8. Click Save when done.
  5. Save the route and the route package.

Flow of events

  1. A file with \u0025 end-of-line character and WE8EBCDIC500 file encoding is uploaded via any protocol to the Advanced Routing subscription folder.
  2. The Advanced Routing application triggers the route.
  3. The uploaded file’s end-of-line character is changed to LF and the file’s encoding is changed to US-ASCII.
Note In the end there are two files present – the incoming (original) file and transformed file. To automatically remove the incoming file, select Post Processing Action -> On Success -> Delete in the subscription settings.
Note Publishing the transcoded file in Advanced Routing subscription folder does not trigger the route execution once again, because Trigger target subscription actions is unchecked.

Related Links