F98MODAT uncompress and save zutxft

nkuebelbeck

nkuebelbeck

VIP Member
I'm trying to use jdeBufferUncompress in 9.2.1.2 tools to extract the blob field to the C:\ drive as proof of concept from my full client.

Attached is the code I'm working with from Brian's example for extracting xml from F98630. I swapped out the call of xmlpUncompress with jdeBufferUncompress but it's crashing object browser when i execute it. I did some debugging and I believe jdeBufferUncompress is returning a -3?

The file is written the F98MODAT with the correct filename so I know I've hit the database correctly. It's just 0 bytes.

I searched the source directory for jde objects using jdeBufferUncompress and there were zero.

Thanks in advance for any help

SOLUTION
couple things. need to open file with the wb switch. I also used jdeFwrite. Thanks craig for revealing the uncompressed nature of the data

stream = jdeFopen(szFileName, _J("wb"));
nReturn = jdeFwrite(dsF98MODAT.zutxft.lpValue, dsF98MODAT.zutxft.lSize, 1, stream);
 

Attachments

  • B559800.zip
    1.6 KB · Views: 117
Last edited:
Hi,

I don't think the data is compressed in that blob. Just read it directly from lpValue

Craig
 
you are correct. Thanks!

I can get the file written but it's still crashing object browser I suspect a buffer overrun? Is this binary data? Is this the best way to write to a file?

I'm using nReturn = jdeFwriteConvert(lpBhvrCom, (JCHAR *)dsF98MODAT.zutxft.lpValue, sizeof(JCHAR), dsF98MODAT.zutxft.lSize, stream);

solution found. see OP
 
Last edited:
Thanks a lot nkuebelbeck!!!! I had the same problem but with your bsfn and some adjustments (example 'jdeBufferUncompress' is not neccesary for pdf, docx and jpeg files) I can download files! (I can't use API's because we have tr 9.2.1.0)
Regards.
 
Sorry, but I have a big problem, in local works fine but in web doesn't work, the batch finished in error and by the log stopped in jdeFwrite function, why? what I could doing?

Regards.
 
Exactly error function is jdeFwrite, I tried with C native fwrite but the same problem with execute in server, the batch finished in error and provoce a zombie process. I 've done a internal BSSV doing the same in java, and it works fine in web server. why? we have all servers in linux (except Deploy of course), if jdeFwrite or fwrite is not window (I found this function in all bsfn c and all are Client only).

Regards.
 
what version of E1 are you using? there are new API's for 9.2 media objects
 
Hi nkuebelbeck, I'm using 9.2.1.0 tools but the API's for media object are in 9.2.1.6, so I can't use. But I hope us migrate soon XD

So, I made a workaround solution implementing a internal BSSV for save physical file in webserver with java file functions. Next, I'll call a proxy bssv for upload to webcenter content by RID (I already have it done for another process).

Regards.
 
Back
Top