0

I have created a genric sequence job. Exec command >> start loop >> job activity >> end loop

Here in exec command stage i have written a script to get list of files present in directory as csv values, and the file count will varry. file,file2,file3

But when i run the job every last itteration fails showing below error @job_activity,error calling DSSetParam(name), code =-4

Salva
  • 81
  • 1
  • 9
  • This code usually means ParamValue/Limitvalue is not appropriate but this cannot be judged through the information provided – MichaelTiefenbacher Mar 11 '22 at 17:26
  • Thanks for the reply @MichaelTiefenbacher, the script reads all the files and passess the file name as csv shown above. So lets say if there are 2 csv values then 0ne itteration succedes and one fails, if 3 csv values are there then 2 succedes and one fails. – Salva Mar 13 '22 at 13:47
  • I also applied @fm in exec cmd on the command Output to get rid of any space or extra unknown value from the csv string if any. Still am getting the same issue – Salva Mar 13 '22 at 13:49
  • Have you checked in the job executed within the loop if the parameters a re correct for the last run and do not differ from the successful run before? – MichaelTiefenbacher Mar 13 '22 at 17:16
  • Yes i did, the last value in csv ideally qualifies as a parameter. Still am facing this strange issue. – Salva Mar 14 '22 at 05:33

1 Answers1

0

Not sure if you figured it out yet, but I was having the same problem. Per one of your comments about handling the @FM, are you doing that inside an Ereplace function (e.g., Ereplace(<string>,@FM,'')?

I had this in my StartLoop activity and after trying several different things, I fixed the issue by adding a new UserVariables activity in-between the command and loop and moving the Ereplace function to it and then using the new user variable as the list in the loop.

Assuming this works for you too, your new flow will look something like this: exec command (where you pull the list and nothing more) >> user variables (create one variable with the Ereplace(<name>.$CommandOutput,@FM,'') [replace the name with whatever you called your exec command] in the expression) >> start loop >> job activity >> end loop.

I haven't been able to find anything from IBM as to why adding that extra step works (hopefully someone else is more successful), but it's what did the trick for me.

Hope that helps.

user3517375
  • 91
  • 2
  • 14