Hi, if you use the SQL interface and SELECT from SESSIONS then the SESSION_ID column is the session number without a comma.
Mit freundlichen Gr��en - With best regards Serdeczne pozdrowienia - Slan agus beannacht Paul Baines TSM/ADSM Consultant "Goalkeepers aren't born today until they're in their late 20s or 30s." Kevin Keegan. -----Urspr�ngliche Nachricht----- Von: Cook, Dwight E (SAIC) [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 29. November 2001 15:46 An: [EMAIL PROTECTED] Betreff: Re: Script to cancel certain sessions Well, just remember that if you want to cancel either a session or a process, you can't have any commas in the number so you can't just do a query & cut the number out. Here is an example of how I deal with process numbers #!/bin/ksh for PROCNUM in $(dsmadmc -id=someid -pass=somepass q pro | cut -c1-8 | grep ^' ' | grep [0-9] ) do echo $PROCNUM | grep , 1>/dev/null 2>&1 if [ $? -eq 0 ] ; then FIRST=$(echo $PROCNUM | cut -d',' -f1) SECOND=$(echo $PROCNUM | cut -d',' -f2) PROCNUM=$FIRST$SECOND fi echo dsmadmc -id=someid -pass=somepass cancel process $PROCNUM done exit so just change the above to do a "q session" and grep for your node name(s) and cut the first 6 characters and use that to cancel the sessions.... now if your sessions get above 99,999 you will have problems because the session number itself will be across two lines of output... hope this helps later dwight -----Original Message----- From: Niklas Lundstrom [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 6:29 AM To: [EMAIL PROTECTED] Subject: Script to cancel certain sessions Hello TSM:ers I'm trying to write a script that should cancel the sessions for certain servers if their backup still runs at 9 am but I'm stuck. How can I do that? It should be automated by a command script. Regards Niklas Lundstr�m F�reningssparbanken IT 08-5859 5164
