List Parameter Questions

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
mjohnson62982
Participant
Posts: 20
Joined: Wed Nov 01, 2017 12:14 pm

List Parameter Questions

Post by mjohnson62982 »

I am working on a job where the user would like to choose one or multiple selections from a list of locations and then have the parallel job run through the locations they choose. Is it possible to do this with a list parameter? If not is there a way to do this?

The job is gathering information on membership card customers at our various locations. Right now it is running through all 19 locations, but the users would like to be able to select locations from list and have the job run on the locations they choose.

Any advice would be greatly appreciated. Thanks...
Respectfully,
Matt Johnson
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

The datastage job will run with whatever YOU pass it as a parm.

You're talking about a pre-datastage parameter selection script/webpage/program/pop-up gui.


There are so many ways to do that, but it all boils down to you passing a parm to an existing job. Sounds like a multi instance job at that.


If the user is selecting a location... does he expect data back in some type of interactive fashion? If so, you could do a REST API interface to a WISD job.

If not, then simply go with your preferred GUI program, select from a pre-ordained list of locations, pass the selection to datastage via a parm.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

The built in List parameter type lets you hard-code multiple values, but only allows you to choose a single value at run time. A related disadvantage of that approach is that any time a location is added or removed, you have to re-hard-code the values, re-compile the job, and perhaps have to re-promote it through your dev/test/production environments.

The question then is how to allow a user to select one or more values from a list at run time. Is that correct?

Just curious, are the users logging into DataStage to run these jobs or are there other user interfaces or tools involved?

I would probably be inclined to somehow (as Paul alluded to) use a pre-job or some other user interface to build a selection set--a text file or records in a database table--then use that location as the first stage in the parallel job, or as a lookup stage, depending on what the job deos. In that case you wouldn't need to fool with parameters.
Choose a job you love, and you will never have to work a day in your life. - Confucius
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

The notion of a user "controlling" a production job scares me more than a little bit. I hope you have controls over that which would prevent a user from creating a mess.

In our environment, I'd use Control-M to pass the location(s) to the DS job. For example, I'd create a variable called LOCLIST, and make it subject to an override/edit at runtime. That's not a user interface, someone in an operations unit would have to do the editing. That would fulfill my control over what the user could do.

LOCLIST would then be passed as a parameter on the DS command line. Coding to accept and use it would be up to you.

A simpler approach, would be a text file containing the location list, which can then be read cyclicly in the job. The user would create the text file and have it placed in the path you determine for it.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The List parameter type allows at most one item to be selected from the list.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply