Jobname as parameter

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Jobname as parameter

Post 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?
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post 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.
pandeeswaran
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

That worked well Pandeesh. Thank you.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Welcome always!! :)
pandeeswaran
Post Reply