sequence + execute command activity + passing parameters

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
jsgoncalves
Participant
Posts: 12
Joined: Tue May 31, 2005 5:01 am

sequence + execute command activity + passing parameters

Post by jsgoncalves »

!hello!

i built a sequence justa as simple as this:
- 1st stage = execute command activity
- command = dir
- parameters = #directoria_saida# /B
- 2nd stage = another sequence
- parameter1 = 1st stage.$CommandOutput (string type)

this always fails, the log being:
sequnce.JobControl (@Job_Activity_5): Controller problem: Error calling DSSetParam(resultado), code=-4
[ParamValue/Limitvalue is not appropriate]

there is only one file in the directory #directoria_saida#

can someone help me ? i'm getting crazy ...
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Re: sequence + execute command activity + passing parameters

Post by kris007 »

jsgoncalves wrote: parameters = #directoria_saida# /B
If B is a file and if you are on windows then it should be a back slash ""

Code: Select all

#directoria_saida#\B
and I also could see a space. There should be no spaces.
Kris

Where's the "Any" key?-Homer Simpson
jsgoncalves
Participant
Posts: 12
Joined: Tue May 31, 2005 5:01 am

Re: sequence + execute command activity + passing parameters

Post by jsgoncalves »

thank you ,

but

B is not a file, it is an option for the dir command, for the result of dir to only use bare format (no heading information or summary), e.g lixeira.txt instead of all the information/overhead

thnxs
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

sequnce.JobControl (@Job_Activity_5): Controller problem: Error calling DSSetParam(resultado), code=-4
[ParamValue/Limitvalue is not appropriate]
What version are you on? If it's earlier to 7.5 then there are known problems while passing parameters within the Execute Command Activity stage. What is your JobActivity5 stage?
Kris

Where's the "Any" key?-Homer Simpson
jsgoncalves
Participant
Posts: 12
Joined: Tue May 31, 2005 5:01 am

Post by jsgoncalves »

! Hello !
kris007 wrote:
sequnce.JobControl (@Job_Activity_5): Controller problem: Error calling DSSetParam(resultado), code=-4
[ParamValue/Limitvalue is not appropriate]
What version are you on? If it's earlier to 7.5 then there are known problems while passing parameters within the Execute Command Activity stage. What is your JobActivity5 stage?
version = 7.5.1
jobactivity5 is the one receiving the command.output

thnxs,
joaquim
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi,
Can you check with parameter values in the Job activity5. The error shows that the parameter value or the limit value is not correct.
And next you are doing wrong in the execute command activity.
1) I think there is no command called 'dir' in unix.
2) parameter assinged is also wrong.

built a sequence justa as simple as this:
- 1st stage = execute command activity
- command = dir
- parameters = #directoria_saida# /B
- 2nd stage = another sequence
- parameter1 = 1st stage.$CommandOutput (string type)

sequnce.JobControl (@Job_Activity_5): Controller problem: Error calling DSSetParam(resultado), code=-4
[ParamValue/Limitvalue is not appropriate]

jobactivity5 is the one receiving the command.output
If possible can you just explain us what exactly you want to do?
jsgoncalves
Participant
Posts: 12
Joined: Tue May 31, 2005 5:01 am

dir + job paraemteres + sequence

Post by jsgoncalves »

! hi !

I just want to do a simple thing:

job1 - to know which file is in the directory (windows = dir vs unix ls) (i always know there is only one file in the directory, that being garanteed by another 3rd party application that generates a file which keeps changing its name automatically generated) and have this filename passed into the 2nd job
job2 - get the filename from job1 (this job will have a ftp stage thus sendinf this file via ftp to another company ftp server)

1 - to know the file i dir directory /B
2 - to get the file name on job2 there is a parameter (job1.$CommandOutput)

thanxs,
joaquim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You may need to trim the command output of extraneous field marks and leading and trailing spaces.

Code: Select all

TrimF(TrimB(Trim(CommandActivity.$CommandOutput,@FM)))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jsgoncalves
Participant
Posts: 12
Joined: Tue May 31, 2005 5:01 am

Post by jsgoncalves »

!!! thank you very much !!!

u can't imagine how much u've helped me !!! it works !!! just fine

:D
Post Reply