Page 1 of 1

Change a default value by script

Posted: Mon Jun 16, 2014 3:17 am
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.

Re: Change a default value by script

Posted: Mon Jun 16, 2014 6:33 am
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?

Posted: Mon Jun 16, 2014 6:44 am
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.

Posted: Mon Jun 16, 2014 6:47 am
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 ?

Posted: Mon Jun 16, 2014 6:52 am
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.

Posted: Mon Jun 16, 2014 7:14 am
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

Posted: Mon Jun 16, 2014 7:15 am
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....

Posted: Mon Jun 16, 2014 7:50 am
by CLOPES
another question about this point:

can i automate a multiple compile by shell ?

Posted: Mon Jun 16, 2014 8:49 am
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.

Posted: Wed Jun 18, 2014 5:54 am
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.

Posted: Wed Jun 18, 2014 7:11 am
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.

Posted: Wed Jun 18, 2014 7:45 am
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.