Preparing Files for Use with Monarch

Monarch Utility enables you to prepare files for use with Monarch. The following file preparation methods are available:

  • Replace a string with another string or an empty one

  • Insert line breaks into continuous stream files

  • Insert line breaks into files with a long line length (e.g., more than 4000 characters)

  • Format EDI files to enable easier processing of them via Monarch

Note: See Using Command Lines and Using Wildcards for related information.

 

  1. Launch the Monarch Utility wizard and ensure that the button for Prepare files for Monarch (Replace, Insert line breaks, EDI) is selected. Press Next when you are finished.

 

The following screen displays.

 

  1. In the Source Folder field, enter the path to the folder containing the file(s) you wish to prepare or click the Browse icon and use the Browse for Folder dialog to locate and select it.

  2. Tick the box for Include subfolders if you also wish to prepare files located in other subfolders in the path indicated in Step 2.

  3. If you wish to move the prepared files to a different location, enter the path to the destination folder in the Destination Folder field (or click the Browse icon and use the Browse for Folder dialog to select it).

  4. Tick the box labeled Preserve subfolders if you wish to retain the same folder structure adopted in the source folder when the selected files are prepared. Note that this field only displays when the Include subfolders option in Step 3 is enabled.

  5. Click Next.

     

  6. Specify the desired file preparation options.

    • Replace all instances of a string with another string or an empty string – This function allows the replacement of a string with another string in a file (or files) that meets a wildcard specification.

    •  If you select this option, in the Replace field enter the string you want to replace, then specify the replacement string in the With field.

    • Insert line breaks into continuous stream files – This function allows you to segment a stream (i.e., a single line) of text or data into segments of a specified length, delimited by a line break.

    •  If you select this option, in the Segment Length field enter the length of segment after which you wish to insert a line break.

    • Insert line breaks into files having line lengths greater than 4000 characters – This function allows you to insert line breaks for files that have lines of text greater than 4000 characters, which is the maximum line input length supported by Monarch V8.

    •  If you select this option, in the Segment Lengths Separated by Spaces field, specify one or more lengths after which you wish to insert a line break, separated by a space.

    • Format EDI – The function adds line breaks to an EDI file after the segment delimiters in the file (if they do not already exist), and also adds white space between consecutive element separators and subelement separators (indicating no data), to enable the creation of templates based on a sample EDI file that has no data in these sections, although future iterations of the files may contain data.

    •  If you select this option, you can have the Monarch Utility attempt to autodetect the formatting characters within the specified file by selecting the Auto-detect Formatting Characters checkbox. If you need to specify the formatting characters, however, you can do so by entering them in the appropriate boxes (i.e., Segment Delimiter, Element Separator, Sub Element Separator, Release Character).

  7. Click Next when you are done.

  8. Review the task summary information, and then click the Finish button to have Monarch Utility perform the task.

    Monarch Utility performs the specified task, and then displays the Process Log.

    In the following figures, we used Monarch Utility to change the string “Betty Yoder,” for example,

 

to “Betty Red.”

 

 

© 2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support