DataStage log file output via dsjob command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting DataStage log file output via dsjob command
# 1  
Old 02-17-2011
DataStage log file output via dsjob command

Hi,

I do have 2 files
Job_Name
Job1
Job2
Job3

Instance_Name
USA
IND
SRI

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

At the end should get 9 files.

Can anyone assist me how to goahead.

Thanks guys,
# 2  
Old 02-17-2011
Of course the following code should be enhanced but that it's a beginning :

Code:
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
# 3  
Old 02-17-2011
Thank you, Sir. will work and let you the result.
# 4  
Old 02-22-2011
Code:
#!/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
Code:
Job1
Job2
Job3

In the Plants.txt i do have
Code:
USA
IND
SRI

when i run it manually, command is working fine.
Any idea why iam getting the error message.

Thanks,

Last edited by Franklin52; 02-22-2011 at 07:57 AM.. Reason: Please use code tags, thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to compile a Datastage Job using Execute Command Stage or Routines in Datastage 11?

I am trying to compile the datastage jobs using the Execute Command stage in datastage 11 or any Routines if possible. My datastage is on Unix machine. So, How can I Compile a datastage job in UNIX from command line or any Routines. Please help me in doing so. Thank you. (1 Reply)
Discussion started by: elena jessi
1 Replies

2. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

3. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

4. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

5. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies

6. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

7. Shell Programming and Scripting

capture last run log using dsjob

Hi All, Could you please let me know how to capture the WARNING or FATAL errors for the last run log using dsjob -logsum in Korn Unix Shell. Thanks in Advance, (0 Replies)
Discussion started by: HemaV
0 Replies

8. Shell Programming and Scripting

Logging Remote SSH command (cannot log a java output)

Hi all I'm creating a script that runs a few commands on some boxes and everything can be logged EXCEPT the java -version command, there doesn't seem to be any output... Can anyone help explain why this does not work? Do I need to do something extra to append the output from the java... (3 Replies)
Discussion started by: Keepcase
3 Replies

9. UNIX for Advanced & Expert Users

invoke windows datastage dsjob from unix

hello, i have a windows server with datastage. In another machine, unix machine, i have a shell script that need to invoke the datastage dsjob. Can anyone help me? (0 Replies)
Discussion started by: anaconga
0 Replies

10. Shell Programming and Scripting

dsjob command to execute DataStage jobs

Hi Friends, I am using a dsjob command in a unix script to invoke DataStage jobs. DataStage server jobs (version 7.5.2) The command looks like thisL: $DSBinPath/dsjob -server :$SERVER_PORTID -run -mode NORMAL -jobstatus -param INPUT_GCDB_DIR=$InputFilePath -param... (0 Replies)
Discussion started by: sureshg_sampat
0 Replies
Login or Register to Ask a Question