DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
mjohnson62982
Participant



Joined: 01 Nov 2017
Posts: 6

Points: 49

Post Posted: Wed Dec 06, 2017 2:05 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Windows
Additional info: Looping, Lists, Parameters
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



Group memberships:
Premium Members

Joined: 17 Dec 2010
Posts: 1166

Points: 7706

Post Posted: Wed Dec 06, 2017 2:16 pm Reply with quote    Back to top    

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.
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2665
Location: USA
Points: 19822

Post Posted: Wed Dec 06, 2017 2:44 pm Reply with quote    Back to top    

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
Rate this response:  
Not yet rated
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 628
Location: Malvern, PA
Points: 5952

Post Posted: Wed Dec 06, 2017 3:39 pm Reply with quote    Back to top    

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: http://www.dsxchange.com/viewtopic.php?t=143596
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54070
Location: Sydney, Australia
Points: 293276

Post Posted: Wed Dec 06, 2017 10:10 pm Reply with quote    Back to top    

The List parameter type allows at most one item to be selected from the list.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours