Change a default value by script

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
CLOPES
Participant
Posts: 52
Joined: Tue Jul 22, 2003 8:05 am
Location: France
Contact:

Change a default value by script

Post by CLOPES »

Hi all,

I'm exporting my project using ISX tool.
In this project, there is some jobs that need to have a default value to run because the job that execute them doesn't fill it and is in another project and doesn't know the parameter value.

Can i change a default value directly in the job or change it in the isx or build a routine to change it using a script shell ?
Don't find anything in the forum.

thanks.

Carlos.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Change a default value by script

Post by chulett »

CLOPES wrote:Can i change a default value directly in the job or change it in the isx or build a routine to change it using a script shell ?
The first two are 'yes' but what do you have in mind for this script?
-craig

"You can never have too many knives" -- Logan Nine Fingers
CLOPES
Participant
Posts: 52
Joined: Tue Jul 22, 2003 8:05 am
Location: France
Contact:

Post by CLOPES »

Hi,

I just don't want to ask to production team to change default values for some parameters jobs as the project author asked before.

I want to change it by shell if i can do it. They don't know Datastage and for me it's incredile to ask changes to teams that don't know Datastage.
CLOPES
Participant
Posts: 52
Joined: Tue Jul 22, 2003 8:05 am
Location: France
Contact:

Post by CLOPES »

It was easy to modify those values using dsx import\export.
My question is about ISX files.

Can i change them without causing damage to the isx ?
or do i have to find a away by routine to modify those values ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Better answer would be to not be reliant on default values, sounds like a switch to leveraging parameter value files may be in order.

There's nothing inherently different about editing a dsx vs. an isx, both are doable and carry the same level of risk. You keep saying 'routine' which has a very specific meaning in DataStage, I'm thinking you just mean 'script' as in a scripted way to do the find/replace before the job is imported, yes? If so then that should be perfectly feasible as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Keep in mind that an isx file is a compressed archive containing XML, so there is a little more to do to hack an isx relative to a dsx. In either case you'll be in unsupported territory if you mess things up.

The better path is to fix the design issue by supported means.

Mike
CLOPES
Participant
Posts: 52
Joined: Tue Jul 22, 2003 8:05 am
Location: France
Contact:

Post by CLOPES »

I'm totally agree with you about best practice (not to be reliant) but i just retrieve this project and i can't change it for the moment.

I know too that isx file is just a zip file with jsb files encapsulated in xml code.
My question was :
can i change those values using a script shell ?
if not
can i change those values using a Datastage Routine or job ?

I think that shell is easier but if i can't do it....
CLOPES
Participant
Posts: 52
Joined: Tue Jul 22, 2003 8:05 am
Location: France
Contact:

Post by CLOPES »

another question about this point:

can i automate a multiple compile by shell ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can edit / change a job export through whatever mechanism you have skills in and are comfortable with. As to the compile question - yes but only on the client side.
-craig

"You can never have too many knives" -- Logan Nine Fingers
CLOPES
Participant
Posts: 52
Joined: Tue Jul 22, 2003 8:05 am
Location: France
Contact:

Post by CLOPES »

Hello Craig,

How can i edit them ? If i take the file as an ISX, i can't read it.
If i unzip it, i will lose the IBM format.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'd have to unzip it, perform the edit and then zip it back up again. Is that not possible? I have no way to test any of this, hence the question.
-craig

"You can never have too many knives" -- Logan Nine Fingers
CLOPES
Participant
Posts: 52
Joined: Tue Jul 22, 2003 8:05 am
Location: France
Contact:

Post by CLOPES »

yes it's possible but i'm not sure that the new ISX zipped will be recognized by Datastage.
I will test it tomorrow.

Thanks anyway.
Post Reply