A mandatory value has not been entered

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

A mandatory value has not been entered

Post by PhilHibbs »

I have a sequence that contains two other sequences and an unconditional link between them. There are no parameters into the sequence, I just created it and dropped the other sequences onto the canvas and linked them.

When I compile it, I get:

Code: Select all

Pre-compiler Processing stage AP_PO_S01_Extract.

A mandatory value has not been entered.
Any suggestions? When I click on the "Show error" button, the first sequence (the one named) highlights.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In case you haven't figured this out yet...

I played around and was able to duplicate the error message, one I'd never seen before. It seems to be related to a Sequence job running another Sequencer via a Job Activity stage (as you noted) and the parameters the 'sub' Sequencers have defined.

Normally, you can leave the Parameter value in the Job Activity stage blank to indicate that it should default in the job being run. That is, unless the parameter in the Sequence being run does not have a default value. In that case, the high level Sequencer considers that parameter 'Mandatory' and requires you to pass something to it.

Hope that helps! :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

chulett wrote:Normally, you can leave the Parameter value in the Job Activity stage blank to indicate that it should default in the job being run. That is, unless the parameter in the Sequence being run does not have a default value. In that case, the high level Sequencer considers that parameter 'Mandatory' and requires you to pass something to it.
Oh dear, that's inconvenient. So I can run the two sequences one after the other manually without providing any parameter values, but DataStage can't?

I just went back and checked, and all the parameters to the contained sequence have default values. Moreover, if I go into the stage properties in the outer sequence, I cannot set a value for the Password parameter.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

PhilHibbs wrote:I just went back and checked, and all the parameters to the contained sequence have default values. Moreover, if I go into the stage properties in the outer sequence, I cannot set a value for the Password parameter.
Hmmm... you got me on that one. The circumstances I described popped up the same error for me during compile, not sure what's going on in your case. Also don't recall ever seeing a situation where you couldn't set a default value. :?

Let us know if you figure out what's going on.
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

chulett wrote:Let us know if you figure out what's going on.
Unfortunately I haven't figured this out yet, but I am now having a similar problem with a sequence that just contains jobs! It fails on some of them with the same error message, and if I try to specify a value for an encrypted parameter, it won't let me (it doesn't go into edit mode). I will raise this with Ascential support.

Update: I have discovered that it is because the job contains a parameter whose default value is blank! The sequence will not compile because it thinks that a blank value is not valid. The parameter wasn't being used anyway so I deleted it, but I still think that this is a bug that needs to be raised with Ascential.
Phil Hibbs | Capgemini
Technical Consultant
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Mandatory value not entered for Sequencer

Post by asorrell »

I have found that you can enter "" (two double quotes) for that parameter and it will send an empty string to the job, which satisfies the compiler.

Odd that it demands all parameters have an entry, but this works for me!
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's right. Jobs and job activities work differently. A job can pick up any value, including an empty value, from the job parameters grid directly.

A job activity in a job sequence, however, expects to find an expression (rather than a value) there. Ultimately it becomes an rvalue in an assignement. To paraphrase, in BASIC you are not allowed to have a statement of the form

Code: Select all

ParamValue =
There has to be something on the right hand side. That "something" is picked up - without being quoted - from the parameters grid and treated as a value-producing expression in the assignment statement.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:A job activity in a job sequence, however, expects to find an expression (rather than a value) there.
:? No, it doesn't... it is perfectly happy with blank expressions. I have tons of Sequence jobs with Job Activity stages where nothing is in most of the parameters. When you park your cursor in them there will be a little red note saying it is empty, but that just allows it (the parameter in the job) to stick with its default value at runtime.

The 'mandatory value' error comes into play when three things combine - a parameter type that requires a value at runtime (like a Date, for instance), the fact that it has no Default Value in the job itself and you then try to leave the parameter value empty in the Job Activity stage. Then it beefs at compile time and as noted - there has to be something on the right hand side. Other than that - no.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

OK, under those circumstances. Also, it seems to have changed in 7.5 with the new mechanism - in 7.0 you can only have a quoted string or a "job parameter" (something from upstream) and even then you have to type in the activity variable name!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's true with regards to the change to enable expressions in the parameter area. It's already bitten one dev here who put 2006-02-07 (for example) into one rather than "2006-02-07" and instead of getting a date ended up with only the 'year' of 1997. :shock: :lol:

He was shocked. I laughed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply