How to remove additional carriage return on FTP file?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to remove additional carriage return on FTP file?

  • Creator
    Topic
  • #52244
    James Mellor
    Participant

      I am retrieving a file via ftp and it contains additional carriage returns at end of file. The sending system states they can’t strip it. The receiving system needs it stripped so their interface won’t drop and can

    Viewing 4 reply threads
    • Author
      Replies
      • #73543
        Jerry Tilsley
        Participant

          You could use either XLATE or TCL proc to strip those characters during the translation process of the route.

        • #73544
          Ryan Spires
          Participant

            You didn’t specify how the file is delivered… One think you can check if it is a file or ftp on the outbound is what your message terminator.

            Check to see if it is “nl”  vs  “eof”   perhaps the engine is adding the extra line.

            Can check this on the inbound too.. to make sure you are keeping the entire file intact as you process through the engine.

          • #73545
            David Owens
            Participant

              If the transfer method is ‘ascii’, carriage returns will be added to the file. Make sure the transfer method is binary.

            • #73546
              Scott Folley
              Participant

                What David is saying is accurate if the two systems are not the same (i.e. windows vs *nix).  If the two systems are the same then no end-of-line conversion would be made in either binary or ascii mode.  In any case it is going to be best (probably) to retrieve those files in single mode then you can put in a proc on either the inbound TPS or the pre-translate queue that will do a “string trimright” on the message.  Once you have done that then the “whitespace” at the end should be gone and you can add back in the line termination that you need.

              • #73547
                James Mellor
                Participant

                  I had it defined as ASCII. Changed to binary and works like a charm. Thanks to all. 😀

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