Parameter value file is apparently not being read

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
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Parameter value file is apparently not being read

Post by iq_etl »

I'm storing a total page count from a Web service in a parameter value file, then attempting to access that value in a sequence loop in order to loop through that total number of pages. However, as long as I'm writing the parameter value file and calling it from the loop in the same sequence, the parameter appears to be using its default value.

My sequence looks like this:

<a href="http://i.imgur.com/W0l0UvE.jpg">[img]ht ... l0UvEl.jpg[/img]</a>

In the current configuration, the get_total_page_count returns 104 pages and writes it successfully to the total_pages parameter value. But the loop runs from "1 to 1" as if total pages is 1 -- and that is the parameter's default value, even though it is clearly receiving the value file value.

However, if I remove the "get_total_page_count" job from the sequence, the loop picks up the correct value and loops repeatedly.

What is up with that?

I've attempted inserting a wait for file activity before the loop to make sure the parameter value file is getting written, and it is. I then noticed that the "get_total_page_count" job was finishing in the same second that "start_page_loop" started and wondered if the file wasn't getting written and closed in time. So I inserted a loop in between them that took 3 seconds. Still no luck.

Any help would be appreciated.

Kelly
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

I may have found my solution.

As I understand it, parameter values are set when a job is compiled and can't be changed while the job is running. However, I thought I had read that using a parameter value file was a way around that limitation.

I created a new sequence to run the get_total_page_count job separately and then start the looping web call sequence and it appears to be working. I'm going to test a bit more and make sure.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your understanding is not quite correct. Parameter values are set when a job is started (not when it is compiled, apart from compiled-in values).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

Ray,

I see. So is it the case that values read from file can not be changed during the same sequence?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Parameter values? No they cannot. That doesn't mean, however, that you can't assign them to other variables and then change those.
Last edited by chulett on Wed Sep 09, 2015 3:05 pm, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

As I understand it, parameter values are set when a job is compiled ...
OP may be referring to this issue.
iq_etl
Premium Member
Premium Member
Posts: 105
Joined: Tue Feb 08, 2011 9:26 am

Post by iq_etl »

That is the issue I was referring to.
Post Reply