F98MODAT uncompress and save zutxft

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: 74
Last edited:

nkuebelbeck

VIP Member
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:

alfredorz

Well Known Member
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.
 

alfredorz

Well Known Member
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.
 

alfredorz

Well Known Member
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.
 

alfredorz

Well Known Member
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.
 
Top