Author Topic: Unload Multiple Load ID's  (Read 4279 times)

waytec

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Unload Multiple Load ID's
« on: January 18, 2008, 08:01:05 AM »
Does anyone know how to unload multiple load ids at once.  I am considering using a bat file but I am not quite sure how the syntax show go right now. I will be provided a list of Load ID's in a single column text file that will need to be unloaded daily.  Any suggestions will be greatly appreciated.

Thanks
Wayne Henderson
Sr. Server Systems Engineer

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2229
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Unload Multiple Load ID's
« Reply #1 on: January 18, 2008, 09:17:52 AM »
Hi.  =)

It sounds like you're on Windows.  I'm not much of a Windows guru, but doing this in UNIX is rather straightforward -- maybe you can convert my ideas into a usable batch file -- of course, it would be great if you could share your results with the group too...

If you have a text file, which contains a list of OnDemand Load ID's, one per line, you would use the following script in UNIX's Korn Shell (ksh) or Bourne Again Shell (bash):

for i in `cat load-id-file`
do
  arsadmin unload -h hostname -u userid -p password -L $i
done

UNIX Shell scripting has a few conventions you might not be familiar with...

for is a looping structure.
` (backtick) characters execute the command within them
cat is analogous to Windows' 'type' command.
do and done enclose a loop.

If this is helpful, I'm sure the rest of the users would be interested to see what you come up with.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

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

JimWilson

  • Guest
Re: Unload Multiple Load ID's
« Reply #2 on: January 18, 2008, 09:20:34 AM »
Here is a batch file I have

arsadmin unload -g SC-035 -L 13447-9-0-44FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-036 -L 8530-6-0-96FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-041 -L 7253-1-0-97FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-042 -L 7256-1-0-98FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-044 -L 7259-1-0-97FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-048 -L 7262-1-0-96FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-049 -L 7265-1-0-97FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-050 -L 11562-6-0-64FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-051 -L 9176-6-0-96FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-052 -L 8533-6-0-96FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-053 -L 7268-1-0-103FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-054 -L 7271-1-0-103FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-056B -L 7274-1-0-98FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-057 -L 12070-9-0-59FAA-13453-13453 -u admin -p password -h ondemand83
arsadmin unload -g SC-059 -L 8551-6-0-97FAA-13453-13453 -u admin -p password -h ondemand83