I need to write a script, i.e, output of job1.USA should come in log in unix.
i.,e
When it runs for the first time it should run as
Job1.USA
next run
Job1.IND
Job1.SRI
Job2.USA
Job2.IND
Job2.SRI
Job3.USA
Job3.IND
Job3.SRI
Total 9 times it should run in 1 script, need to automate the process.
Below command should be executed in the script.
/is/app/IBM/InformationServer/Server/DSEngine/bin/dsjob -logsum Project_Name Job_Name Instance_Name> Job_Name Instance_Name.log
Of course the following code should be enhanced but that it's a beginning :
for j in Job1 Job2 Job3
do
for i in USA IND SRI
do
/is/app/IBM/InformationServer/Server/DSEngine/bin/dsjob -logsum Project_Name "$j" "$i"> "$j$i".log
done
done
Maybe you want "$j.$i" instead of your "Project_Name" ?
feel free to adapt to your needs
#!/bin/bash
for j in 'Extract.txt'
do
for p in 'Plants.txt'
do
/is/app/IBM/InformationServer/Server/DSEngine/bin/dsjob -logsum <Project_Name> "$j"."$p" > "$j$p".log
done
done
Hi guys,
Above is the script
When i run it says ERROR: Failed to open job Status code = -1004.
In the Extract.txt i do have
Job1
Job2
Job3
In the Plants.txt i do have
USA
IND
SRI
when i run it manually, command is working fine.
Any idea why iam getting the error message.