DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 109

Points: 1819

Post Posted: Mon Jul 02, 2018 2:43 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Server
OS: Windows
Hi, I was curious about setting a parameter value using a Data Item. I have a report that I have created a Data Item that uses a CASE WHEN condition to try and set the value of ?myParam? parameter. Then a Filter set on [My Field] > ?myParam? for example. This is an optional filter so if the CASE WHEN doesn't assign a value to the parameter then the filter will not apply. It appears that its never assigning the value to the parameter. Here is an example of the Data Item Expression that is supposed to set the parameter value:
CASE
WHEN (?Param1? = 'X') THEN (NULL)
WHEN (?Param1? = 'Y') THEN (?myParam? = 45)
ELSE (NULL)
END

The optional filter is:
[myField] > ?myParam?

_________________
-Me
Mike



Group memberships:
Premium Members

Joined: 03 Mar 2002
Posts: 1017
Location: Omaha, NE
Points: 6551

Post Posted: Mon Jul 02, 2018 4:26 pm Reply with quote    Back to top    

A job can not modify its own parameters. They are set when the job begins executing. The usual technique is to use a separate job/routine/command to derive the required parameters and then pass them to the job that needs them.

There should be lots of discussion about the various techniques. Since you're using a server job, the user status property is very handy.

Mike
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: 54254
Location: Sydney, Australia
Points: 294257

Post Posted: Mon Jul 02, 2018 9:40 pm Reply with quote    Back to top    

Cognos?

Will DSXchange need another forum for Watson, or will it just rename this forum something like IBM BI ?

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 109

Points: 1819

Post Posted: Tue Jul 03, 2018 8:06 am Reply with quote    Back to top    

Mike,
I think our wires are crossed, or I am misunderstanding. I am referring to Cognos reports. In any case I think I found a way around what I was trying to do, many ways to skin the cat thankfully. I will update this again once I have confirmed my idea.

Ray,
I have no idea???

_________________
-Me
Rate this response:  
Not yet rated
Mike



Group memberships:
Premium Members

Joined: 03 Mar 2002
Posts: 1017
Location: Omaha, NE
Points: 6551

Post Posted: Tue Jul 03, 2018 3:32 pm Reply with quote    Back to top    

Sorry. My bad. Didn't notice the forum.

Mike
Rate this response:  
Not yet rated
jackson.eyton



Group memberships:
Premium Members

Joined: 26 Oct 2017
Posts: 109

Points: 1819

Post Posted: Fri Jul 06, 2018 7:32 am Reply with quote    Back to top    

I did in fact get a work around for this functioning. Basically I have a report that has a prompt to run one of a selection of report pages. The report pages use the same query but with different filters. In this case I made a report to use flag, then made the report requirements (Balance < X for report 1, and Days OD > Y for report 2) a flag as well. Each row then has a flag for which report it belongs in and these are concatenated as rows can belong to one or both reports. Then the filter is set to only show rows that have their report selected flag value in the report belongs to flag. These flags are all hidden from the report output of course.

_________________
-Me
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