ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Missing crlf in pc file to Iseries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Missing crlf in pc file to Iseries

    We are receiving a file from another company and they have strip off the crlf codes from the file. Does anyone have a utility they would not mind sharing on how to had these back. The other company is unwilling to do so, since they send out numerous file to other customers. By stripping the codes the file is smaller and easier to transmit.

  • #2
    I think I know that

    We need to get the hexcodes for CR & LF
    I have them some where I will find later or you can do web search.

    Copy the data down to a flat file with one field called "data"

    then in RPG

    find the last char in the line
    USER the CHECKR command

    Code:
    ' ' checkr data end
    if %found
    eval %subst(data:str+1) = %trim(CRLF)
    update file
    endif

    Comment


    • #3
      If you can

      Post a copy of the file. Ill throw something together...

      It may cost you a favor later though

      jimmyoctane

      Comment


      • #4
        Thanks

        Thanks for the offer but I had to write a program to do this. They had also written the file in a 80 character Block which cause the actual end of record at time to be in the middle of the next record.

        Comment

        Working...
        X