Page 1 of 1

Jobname as parameter

Posted: Wed Dec 21, 2011 12:00 am
by vskr72
I have a many jobs that create a logfile after the job is complete. I use the DSJobLog after jobs routine to create the logfile. The file is created in the following format. Here JB_Master is the jobname

Code: Select all

JB_Master_20111220_122954.txt
Now after the job log is created, a job is built to read this file and load it into a log table. So, I want to build a sequencer which will call 2 jobs in sequence:

Code: Select all

1. Main job that loads an application table
2. Job that loads the log table.
When I do this, I want to pass the jobname from step 1, so that it can use the file pattern and read the appropriate log file. Pls suggest me how to achieve this. IS there any other way to handle this?

Posted: Wed Dec 21, 2011 12:35 am
by pandeesh
a) Job activity stage

b)Command activity stage -write a generic script to Get the log details and finally echo the filename

c)Jobactivity stage--In this use filename as CommandActivitystage.$CommandOutput

This will work.

Posted: Wed Dec 21, 2011 1:54 am
by vskr72
That worked well Pandeesh. Thank you.

Posted: Wed Dec 21, 2011 2:44 am
by pandeesh
Welcome always!! :)