Fileset-ftp Converting Carriage Returns to Newlines

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Fileset-ftp Converting Carriage Returns to Newlines

  • Creator
    Topic
  • #55401
    Lonnie Davis
    Participant

    Hello!

    I have an inbound thread set to use the fileset-ftp protocol and notice an unexpected conversion of carriage returns to newlines when using the single and eof styles.

    The files that are being picked up contain one HL7 ORM message with each segment separated by a carriage return and the file ends with a carriage return and newline (rn).

    The HL7 style generates a protocol error stating “short read”, the NL option splits the segments apart and creates one message per line (in SMAT each segment is a new message).  Using the single and eof styles gets the whole message across to the outbound thread, but each carriage return is converted to a newline.

    I have tried removing the newline from the end of the file and the exact same result occur with each style tried.

    The question is, how do I set the fileset-ftp protocol to take the file and keep the carriage returns as the segment terminator?  If there is nothing I can do, how do I describe how the message needs to be formatted to my source system vendor?

    Included is the test message I am working with using the Unix ‘od -c’ command to view the characters.

    Code:


    0000000    M   S   H   |   ^   ~     &   |   U   T   M   B   |   D   A
    0000020    0   0   0   8   1   4   |   1   1   0   0   |   D   A   |   2
    0000040    0   1   7   0   5   1   5   1   2   3   5   0   0   |   |   O
    0000060    R   M   |   2   0   1   7   0   5   1   5   1   2   3   5   0
    0000100    0   0   0   0   0   0   0   2   |   P   |   2   .   3  r   P
    0000120    I   D   |   1   |   0   0   0   1   1   |   |   |   Z   Z   Z
    0000140    T   E   S   T   ^   E   I   G   H   T   ^   T   |   |   1   9
    0000160    5   4   0   5   2   3   |   |   |   X   |   1   1   1       C
    0000200    O   M   M   E   R   C   E       S   T   R   E   E   T   ^   ^
    0000220    D   A   L   L   A   S   ^   T   X   ^   7   5   2   0   7   |
    0000240    |   |   |   |   |   |   4   2   1   1   9   8   2   5   ^   ^
    0000260    ^   C   |   1   2   3   1   2   1   2   3   4  r   P   V   1
    0000300    |   1   |   |   |   |   |   |   4   8   4   1   8   ^   A   D
    0000320    A   M   S   ^   ^   ^   ^   ^   ^   L  r   O   R   C   |   N
    0000340    W   |   1   2   8   0   0   2   5   5   |   |   |   |   |   |
    0000360    |   2   0   1   7   0   5   1   5   1   2   3   5   |   |   |
    0000400    4   8   4   1   8   ^   A   D   A   M   S   ^   ^   ^   ^   ^
    0000420    ^   L  r   O   B   R   |   1   |   1   2   8   0   0   2   5
    0000440    5   |   |   0   0   3   0   0   4   ^   C   R   E   A   T   I
    0000460    N   I   N   E       C   L   E   A   ^   L   |   |   |   2   0
    0000500    1   7   0   5   1   5   1   2   3   3   |   |   |   |   N   |
    0000520    |   |   |   |   |   |   0   0   1   |   |   |   |   |   |   |
    0000540    |   |   ^   ^   ^   ^   ^   R  r   O   R   C   |   N   W   |
    0000560    1   2   8   0   0   2   5   5   |   |   |   |   |   |   |   2
    0000600    0   1   7   0   5   1   5   1   2   3   5   |   |   |   4   8
    0000620    4   1   8   ^   A   D   A   M   S   ^   ^   ^   ^   ^   ^   L
    0000640   r   O   B   R   |   2   |   1   2   8   0   0   2   5   5   |
    0000660    |   0   0   5   3   3   0   ^   R   B   C       S   I   C   K
    0000700    L   E       C   E   L   L   ^   L   |   |   |   2   0   1   7
    0000720    0   5   1   5   1   2   3   3   |   |   |   |   N   |   |   |
    0000740    |   |   |   |   0   0   2   |   |   |   |   |   |   |   |   |
    0000760    ^   ^   ^   ^   ^   R  r   O   R   C   |   N   W   |   1   2
    0001000    8   0   0   2   5   5   |   |   |   |   |   |   |   2   0   1
    0001020    7   0   5   1   5   1   2   3   5   |   |   |   4   8   4   1
    0001040    8   ^   A   D   A   M   S   ^   ^   ^   ^   ^   ^   L  r   O
    0001060    B   R   |   3   |   1   2   8   0   0   2   5   5   |   |   5
    0001100    5   1   8   0   0   ^   H   I   V   –   1       P   H   E   N
    0001120    O   S   E   N   S   ^   L   |   |   |   2   0   1   7   0   5
    0001140    1   5   1   2   3   3   |   |   |   |   N   |   |   |   |   |
    0001160    |   |   0   0   3   |   |   |   |   |   |   |   |   |   ^   ^
    0001200    ^   ^   ^   R  r  n

    Here is the message as viewed from inbound SMAT using the HL7 encoding format to see the ASCII control characters.

    Code:


    MSH|^~&|UTMB|DA000814|1100|DA|20170515123500||ORM|201705151235000000002|P|2.3<0xa>PID|1|00011|||ZZZTEST^EIGHT^T||19540523|||X|111 COMMERCE STREET^^DALLAS^TX^75207|||||||42119825^^^C|123121234<0xa>PV1|1||||||48418^ADAMS^^^^^^L<0xa>ORC|NW|12800255|||||||201705151235|||48418^ADAMS^^^^^^L<0xa>OBR|1|12800255||003004^CREATININE CLEA^L|||201705151233||||N|||||||001|||||||||^^^^^R<0xa>ORC|NW|12800255|||||||201705151235|||48418^ADAMS^^^^^^L<0xa>OBR|2|12800255||005330^RBC SICKLE CELL^L|||201705151233||||N|||||||002|||||||||^^^^^R<0xa>ORC|NW|12800255|||||||201705151235|||48418^ADAMS^^^^^^L<0xa>OBR|3|12800255||551800^HIV-1 PHENOSENS^L|||201705151233||||N|||||||003|||||||||^^^^^R<0xa><0xa>

    I am using Cloverleaf v6.2 on AIX.

Viewing 1 reply thread
  • Author
    Replies
    • #85191
      David Barr
      Participant

      Set the inbound protocol to use binary mode (FTP protocol properties, FTP options tab, Data Type: image/binary).

    • #85192
      Lonnie Davis
      Participant

      David Barr wrote:

      Set the inbound protocol to use binary mode (FTP protocol properties, FTP options tab, Data Type: image/binary).

      Thank you David!  That solved the problem!

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10