arsdoc delete

Previous topic - Next topic

pankaj.puranik

Hi

I wanted to delete a document from CMOD that has around 30 fields.
I have the load ID and I can use load ID plus one of the 30 fields to uniquely identify the document using 'arsdoc query' with -x parameter.

Unfortunately, the arsdoc delete doesnot have -x option which means I have to pass all 30 fields to make sure only one record is deleted.
This is really frustrating.

Does anyone have any suggestions?

Thanks
Pankaj.

Justin Derrick

You should be able to use the -i option and use an SQL statement to identify your document to be deleted.

Let us know how it works out!

-JD.

Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

pankaj.puranik

Yes -i would work.
But I wanted to avoid constructing a query with -i parameter since i will have to add 30 fields to uniquely identify a document.
If I had a -x option, i would have to just pass the load ID and one of the 30 fields.

But looks like I will have to live with the -i parameter.

jw

Pankaj,

If I understand Justin correctly, he meant something like this in your -i, rather than having all 30 fields

[-i "WHERE doc_name = '3762FAA' and pri_nid=132 and sec_nid=0"]

Hope this works for you.

-jw

Justin Derrick

Yes - the -i option allows you to do free-form SQL select statements.  JW's example was correct.  You can use any field you've defined in the AG, as well as CMOD's internal fields like DOC_NAME and DOC_OFFSET.

I would use something like "where CUST_NUM=12345 and ZIP_CODE=90210".

Just remember to be careful and test your queries.  You could cause a lot of damage with a typo.

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

pankaj.puranik

pri_ind, sec_ind and doc_name - Are these CMOD defined columns?

jw

Pankaj,

Yes, they are.  But, you can use them in the -i clause.

By the way, it is pri_nid and sec_nid, not pri_ind and sec_nid

-jw