dsICM = new DKDatastoreICM();
dsICM.connect("ICMNLSDB", user, pass, "");
String query = "/'PBTRUST'[@ITEMID = \""+itemId+"\"]";
DKNVPair options[] = new DKNVPair[3];
options[0] = new DKNVPair(DKConstant.DK_CM_PARM_MAX_RESULTS, "1");
options[1] = new DKNVPair(DKConstant.DK_CM_PARM_RETRIEVE, new
Integer(DKConstant.DK_CM_CONTENT_ATTRONLY));
options[2] = new DKNVPair(DKConstant.DK_CM_PARM_END, null);
dkResultSetCursor cursor = dsICM.execute(query,
DKConstantICM.DK_CM_XQPE_QL_TYPE, options);
DKDDO ddo, part;
DKPidICM apid;
DKLobICM lob;
short dataid;
DKParts dkParts;
dkIterator iter;
while((ddo = cursor.fetchNext()) != null)
{
ddo.retrieve();
dataid = ddo.dataId(DKConstant.DK_CM_NAMESPACE_ATTR,
DKConstant.DK_CM_DKPARTS);
dkParts = (DKParts)ddo.getData(dataid);
iter = dkParts.createIterator();
while(iter.more())
{
part = (DKDDO)iter.next();
apid = (DKPidICM)part.getPidObject();
lob = new DKLobICM(dsICM);
lob.setPidObject(apid);
lob.retrieve();
lob.setInstanceOpenHandler("c:\\program
files\\ibm\\cm82\\client\\icmviewer.exe", true);
lob.open();
}
}
As you can see, this will open an instance of icmviewer for each part,
I'm just lost on how to join these parts together into one document, it
makes it harder that I'm having to code this in notepad as we don't
have a Java IDE at my work and are not allowed to use freeware IDE's.
And help would be much appreciated.