1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Can I pipe commands to dsmadmc?

Discussion in 'Scripting' started by droach, Dec 6, 2012.

  1. droach

    droach ADSM.ORG Senior Member

    Joined:
    Jan 7, 2008
    Messages:
    181
    Likes Received:
    3
    Occupation:
    I'm thinking...
    Location:
    Cut and Shoot, Texas
    I need to delete a few thousand objects from the TSM database with the command "delete object 0 nnnnnnnn". Is there a way that I can open dsmadmc once and pipe the list of commands to it?

    My current script (below) works, but requires a login every time and clutters up the log file

    dsmadmc %LOGINPARAMS% %tsmhost% "delete object 0 nnnnnnn1"
    dsmadmc %LOGINPARAMS% %tsmhost% "delete object 0 nnnnnnn2"
    dsmadmc %LOGINPARAMS% %tsmhost% "delete object 0 nnnnnnn3"
    .
    .
    .

    I am running bat files on a Windows TSM installation.
     
  2.  
  3. moon-buddy

    moon-buddy ADSM.ORG Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,625
    Likes Received:
    318
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    If the TSM header is your problem, do this:

    dsmdmc /tcpserveraddress=<TSM_Server> /tcpport=<TSM_Port> /id=<admin> /pa=<password> /noc /dataonly=yes "Delete ...."
     
    droach likes this.
  4. droach

    droach ADSM.ORG Senior Member

    Joined:
    Jan 7, 2008
    Messages:
    181
    Likes Received:
    3
    Occupation:
    I'm thinking...
    Location:
    Cut and Shoot, Texas
    Thanks for the reply Moon-buddy. That did help reduce the fluff in my logs.
     

Share This Page