Slightly different query, but you should get the idea:
for i in `dsmadmc -se=xxxx -id=xxxx -password=xxxx -tab "select '!#!#', volume_na me from libvolumes where (volume_name not like 'F%' and status='Scratch') or vol ume_name in (select volume_name from volumes where volume_name not like 'F%' and (devclass_name='DEVC_3590' and status='PENDING'))" | awk '/^!#!#/ {print $2}'` do printf "============================\n" printf "Checking out volume %s\n" $i dsmadmc -se=xxxx -id=xxxx -password=xxxx "checkout libv robot_3494 $i remove=no" done Mit freundlichen Grüßen - With best regards Serdeczne pozdrowienia - Slan agus beannacht Paul Baines TSM/ADSM Consultant -----Ursprüngliche Nachricht----- Von: Guan, Phillip [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 2. Oktober 2001 17:07 An: [EMAIL PROTECTED] Betreff: SQL select and update command Hi all, Could someone give me an example how to do a select and then run command against the select reqult? For example, I want: Select volume_name from volumes where access!='READWRITE' then update volume the_result_from_select access=readwrite. Thanks. Best regards, Phillip Guan