A question here is why should we use ASBITSTREAM function when the variable contains a BLOB which is a byte array ?
One more interesting point in this is that if I open the zip (empty looking one) in notepad, I can see the zip entries (file names in clear text) interspersed within the binary data.
Will try out using Base64 encoding and will report my findings.
If I remember correctly it has to do with encoding 8 bit vs 7 bit and UTF-8 settings. It is better to specify 64 bit encoding and do not forget to specify this also in MIME.
Houston, we have a touch down ! Using the Base64 encoding worked. I now have a valid zip file delivered in my inbox !
Code:
CREATE FIELD mimePart."Content-Type" TYPE NameValue VALUE 'application/zip; name=application-logs.zip';
CREATE FIELD mimePart."Content-Transfer-Encoding" TYPE NameValue VALUE 'base64';
CREATE LASTCHILD OF mimePart TYPE Name NAME 'Data';
CREATE LASTCHILD OF mimePart.Data DOMAIN('BLOB') PARSE(BASE64ENCODE(refFileSet.PackedData) CCSID 1208 ENCODING 273);
Thank you fjb_saper, mqjeff, Vitor ! I bow to thee !
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum