ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Error when unzipping file transferred from IFS folder to physical file member

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

  • Error when unzipping file transferred from IFS folder to physical file member

    We are using p7Zip utility to zip and password protect a text file. The zip file is created correctly in a IFS folder and there is no issue when we unzip it from the IFS folder. However when we copy the file from the IFS folder to the member of a physical file and then transfer it to a remote folder, we get the error "Invalid archive ..." when trying to unzip the file.

    This issue occurs only when the length of any line in the text file is more than certain number of characters (our file has lines exceeding 500 characters). There is no issue when all the lines in the file are less than say 100 characters. We are trying to determine the threshold of the number of characters at which this issue occurs. Any help in resolving this issue is greatly appreciated.

  • #2
    A zip file is a binary file, it is not text. If you are going to copy it to a physical file (I do NOT recommend that unless you have a really, really good reason) then you need to be sure to do it in binary safe manner. That probably means special software that converts it to text (such aas base64 encoding it, splitting it across records, and then converting it back on the other end) or something similar. Or, you can store the data in binary-safe fields, such as a BLOB field in the database table.

    Comment

    Working...
    X