Parameter Usage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Parameter Usage

Post by WoMaWil »

Sometimes it could be of interest to reduce those parameters which aren't any more used at any place it the Job. Is there a simple way to make a usage analyse if a parameter is still used?
Wolfgang Hürter
Amsterdam
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

Personally I'd do this on a .dsx export of the project - I have a script that does a daily export of the whole project and a bunch of scripts that do various analysis tasks such as looking for file names with spaces in, and the hash keys for certain hashed file types.
Phil Hibbs | Capgemini
Technical Consultant
tsn
Participant
Posts: 51
Joined: Wed Jan 10, 2007 1:32 am

Post by tsn »

simple way to do this. export the job. have the parameter list in a file or in the variable of a script, in the same script look for the parameter are used in multiple places inside thejob or not. if the count is 1 then you are not using it. so that you remove that from your job.
with regards,
tsn
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So long as you're very careful to look everywhere! A parameter name can appear in an expression, but is only a parameter name if it is not enclosed within quotes (in which case it is a literal string).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tsn
Participant
Posts: 51
Joined: Wed Jan 10, 2007 1:32 am

Post by tsn »

simple way to do this. export the job. have the parameter list in a file or in the variable of a script, in the same script look for the parameter are used in multiple places inside thejob or not. if the count is 1 then you are not using it. so that you remove that from your job.
with regards,
tsn
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Thank you all for your input. I thought it might give a more easy way of doing by doing a lookup into the metadata.
Wolfgang Hürter
Amsterdam
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

ray.wurlod wrote:So long as you're very careful to look everywhere! A parameter name can appear in an expression, but is only a parameter name if it is not enclosed within quotes (in which case it is a literal string).
Something that looks like a parameter usage, such as #PARAM# or #$ENVVAR# is unlikely to appear in a literal string. I suppose if your projects do have literal strings like this in them, then you would need to take special care not to mistake a literal string for a parameter usage, for instance if you have jobs that process DataStage job design information. Most projects I guess would not experience any false positives in this manner. What you don't want is parameter usages to be missed out, because then you might delete a parameter that is used. Can you think of any instances where a parameter would not be immediately obvious like #PARAM#?
Phil Hibbs | Capgemini
Technical Consultant
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes. The "#" characters do not appear when a parameter name is used in an expression.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Mamu Kim
Post Reply