I have a requirement to develop an AWK script for running a DQL and writing the result set in an ABC.xls.
I need to place the output excel under the folder path /Systems/Reports in Documentum Administration.
My code is :
myQuery = "select r_object_id,count(*) from dm_document where r_creator_name='XYZ' GROUP BY r_object_id";
status = dmAPIExec("execquery,"session",F,"myQuery );
print "status: " status;
if (status != 1)
err_msg = dmAPIGet("getmessage,session")
collection = dmAPIGet("getlastcoll,"session);
objID = dmAPIGet("get,"session","collection",r_object_id");
print "Object ID is " objID ;
print "$1,$2;" OFS="|" >> ABC.xls;
print "##Total number of objects: "count;
With the above code I am able to create a query collection but I am unable to write the results into an excel file. Even writing the result into a text file first and then writing it to excel file via txt file is also a possible workaround.