Error Message -4 in Sequence Job

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
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Error Message -4 in Sequence Job

Post by ScottDun »

Hi,

I am running my sequence job and I am using a Loop. Within this Loop is a parallel job and then another sequence job. I am returning an error code of "code=-4
[ParamValue/Limitvalue is not appropriate]". I have re-compiled it, added "Ereplace(EC_MAX_ETN.$CommandOutput,@FM,'' )" to it and still nothing.

The previous 2 stages are (1) a Job activity running a parallel job that is extracting a max value from an ODBC to a file and (2) an execute command that is taking that value from that file and forwarding it into the job activity I am stuck on.

Is there any other options other than Ereplace(EC_MAX_ETN.$CommandOutput,@FM,'' ) ?

Thanks
SCOTTDun
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The EReplace command is just taking out field marks, and I'm not sure why you used that for this problem.
What parameters does the job you are calling have, and what datatypes are they. Those that aren't strings are the likely candidates for causing this error, so that is where you should start your investigation.
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Post by ScottDun »

The job worked fine yesterday from early morning til 4pm and then the error started occuring. I have 2 parameters , 1 is string and the other is integer. I think it is for the integer because my datastage job creates a file with an integer value, cat command is used in execute command to pass that integer value as a parameter to another job.

The string expression in the job activity is "Trim(Convert(@FM,"", SL_INBND_FILES.$Counter))"
SCOTTDun
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... $Counter is an integer that comes from the Start Loop stage and shouldn't need any special handling or trimming. And in spite of what Arnd said, what I've found is the string parameter is typically what throws the "is not appropriate" error when there are non-string characters like a Field Mark in them so what you are doing with the EReplace function seems appropriate.

Any chance you're running off the end of your file list? Meaning you need to process four file names but the loop counter tries to run the loop five times?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What exactly is your loop variable derivation (assuming it is a "list-loop") and to which parameter type are you sending it? That would probably answer the question.
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Post by ScottDun »

Starting loop is a list loop, comma delimited with the CommandOutput from a command execute stage that reads multiple files
SCOTTDun
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Post by ScottDun »

So an update... In the job activity with the parallel job taking a number from the ODBC, I used SQL for a max function. But I am now using a transformer and remove duplicates to retrieve the max function. The trans and RD work to get the value to the file but the sequence job fails. Without the 2 new stages, it passes but we are not to use sql for our sit team. I believe the answer to my problem is within these two new stages
SCOTTDun
Post Reply