X12 segmented files

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf X12 segmented files

  • Creator
    Topic
  • #54438
    Brenda Carpenter
    Participant

      Does anyone know how to ouput an X12 file in segmented format out of Cloverleaf?  

      Our vendor has requested an X12 834 segmented file (one record per line).  As coded, my output file is one long string of data, so I inserted a new line character to segment the file after the end of line tilde using a post proc.  This is not acceptable to them, so am removing it, but wanted to reach out to you all to see if there a setting in the X12 configurator that I am missing?

      Thanks

    Viewing 1 reply thread
    • Author
      Replies
      • #81476
        Jim Kosloskey
        Participant

          If you want a LF at the end of each segment then in your Xlate using Tcl you can set the SEPCHARS Metadata field to the value set you want.

          This is a keyed list:

          FIELD *

          COMPONENT :

          SEGMENT ~

          REPEAT ^

          The above is an example but I think follows the X12 standard.

          So set the SEGMENT Key value to x0a for example.

          I have a proc which will set SEPCHARS Metadata to what you want (you give it what you want). If you would like that email me.

          If the file has an ISA segment and you are building that via Tcl, then you may need to change the appropriate field in the ISA (I think it is the last field – field 17) from ~ to x0a to indicate to the receiving system you are using x0a as the segment terminator.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #81477
          Brenda Carpenter
          Participant

            Thanks Jim. And, yes the X12 file is output with the standard characters you listed above with no intervention using tclprocs.  

            One of the advantages for using x12 is to save on file size, no wasted space, so segmenting the file diminishes this.  I am going to send a set of test files to them today unsegmented and see if they are willing to take the files in this format before pursuing further using tcl.  I just thought I might be missing some setting in Cloverleaf that might allow me to set the output segmented or not.

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.