Page 1 of 1

How to order Parameter Sets Values inside one Parameter Set?

Posted: Tue Jan 15, 2013 9:06 am
by jusami25
Hi all,

I'll like to know if its possible to order the values of one parameter set.

For example, if you look at this image, we have several values for the parameter set called HEADER_ETL_PARAMS

Image

But the values are unsorted, even if we have entered it in order. As soon as I save que parameter set, I open it again and it comes up like in the image.
When we try to run a job and have to set a value for the parameter set, it comes unsorted too, so its a bit unpractical to look to the entire list to get the one that you want.

Any idea of how to have it sorted?

Thanks in advance!

Posted: Sun Jan 20, 2013 11:19 am
by kduke
I think you can right click and drag and drop to order you want. Have you tried it?

Posted: Mon Jan 21, 2013 7:25 am
by jusami25
Hi kduke,

I've tried with both mouse button, and in combination with SHIFT, ALT and CONTROL keys, and no luck.

Datastage seems to apply some kind of 'Hash' because if I insert a new value called 'TEST' it goes directly to the position 31.
Then I change 'TEST' to something else, changes it position... and put back 'TEST' and goes to pos 31 again. Kinda strange...

Posted: Mon Jan 21, 2013 10:12 am
by kduke
I need to try it. Let you know. It should be the same as when you move a column up or down in the metadata. Right click and hold it down and drag. Like in any stage.

Posted: Mon Jan 21, 2013 12:53 pm
by ray.wurlod
I have seen the same thing with stage variables. You re-order them and save the job. When you re-open the job, they're back in their original order.
(Version 8.5.0.1)

Posted: Tue Jan 22, 2013 2:37 am
by jusami25
OK, I've found why Datastage orders the parameters sets values in this way.

As you may know, each value of the parameter set is stored in a different physical file.
For example, in my case, for each value I have a different file inside the directory /ETL/Projects/R1B1/ParameterSets/HEADER_ETL_PARAMS.

If I go there, list all the files and order them using their inode (i'm working on unix) I get exactly the same order that I have inside the parameter set in datastage.

So instead of getting the list of files by name, it get its by inode... wonderful.

Posted: Tue Jan 22, 2013 4:34 am
by ray.wurlod
However stage variables are not stored in files.