Before job-subroutine --> need help

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

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

Post by ArndW »

Kamal, tell us WHAT datatype you defined this parameter as, and WHAT value you are trying to pass to that parameter, then you will get an answer.
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

Sainath.Srinivasan wrote:It will be very useful to provide actual names of the parameters than talking relative reference names - x and y.

1.) What is the job name?
2.) What is the parameter in the job called as (not the job sequence) ?
3.) What is the name of the executeCommand stage in your sequence ?

If you answer the above questions, someone will be able to assist you better.
hi,

1. jobname is "fetchval_file_job"
2. k_val is the parameter in the job
3. Excmd_file is the name of the executeCommand stage in the sequence

Thanks for suggestion,
kamal.
[/b]
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

Sainath.Srinivasan wrote:It will be very useful to provide actual names of the parameters than talking relative reference names - x and y.

1.) What is the job name?
2.) What is the parameter in the job called as (not the job sequence) ?
3.) What is the name of the executeCommand stage in your sequence ?

If you answer the above questions, someone will be able to assist you better.
hi,

1. jobname is "fetch_val_job"
2. k_ftch is the parameter used in the job
3. excmd_file is the name of the executeCommand stage in sequence

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

Post by ArndW »

In your job, you can only declare the type of "k_ftch" as String,Encrypted,Integer,Float,Pathname,List,Date and Time. We are looking for one of these as an answer to the first questions.
The second question is what actual value are you passing to "k_ftch".
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

ArndW wrote:In your job, you can only declare the type of "k_ftch" as String,Encrypted,Integer,Float,Pathname,List,Date and Time. We are looking for one of these as an answer to the first questions.
The second question is what actual value are you passing to "k_ftch".
hi,

i want to pass the result of shell command that was executed in the execute command stage to parameter k_ftch. And need to use the passed value of parameter in one of column of the job.

Thanks in Advance,
kamal

[/u]
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Kamal,

Try the following steps
Open the sequencer
-> Double click on the job stage to open its properties
-> Ensure you are on 'Job' tab
-> Click on k_ftch parameter to get your mouse focus
-> Click on the elipse (...) to enable editing of parameter
-> Click on the elipse again to get list of stages
-> Click Activity Variable
-> Select plus (+) before the excmd_file from the list
-> Select command output from the list
-> Click OK to close the job stage
-> Save your sequencer
-> Compile the sequencer
-> Run the sequencer

Hope this answers.
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

Sainath.Srinivasan wrote:Kamal,

Try the following steps
Open the sequencer
-> Double click on the job stage to open its properties
-> Ensure you are on 'Job' tab
-> Click on k_ftch parameter to get your mouse ...
hi sainath,

Your reply is not fully displayed to me could u please send to me as a private message. sorry for inconvience and for troubling u. just i am trying to learn sequences.

Thanks for your cooperation,
kamal
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sai posted almost exactly the same steps that I did, which I find a little odd as it won't help at all at this point.

Kamal - you need to answer Arnd's rather simple question: this "k_ftch" parameter you have in your job, what type is it? String, Pathname, what?

And please confirm for me that you did indeed add the "<1>" (no space) at the end of the $CommandOutput string exactly as I noted. Your error implies you did not. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Craig,

The difference is the inclusion of parameter and stage names to provide precise set of actions.

Kamal - Maybe couple of screen shots may answer.

1.) Sequencer
2.) Job properties from sequencer
3.) Job properties from job
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

chulett wrote:Sai posted almost exactly the same steps that I did, which I find a little odd as it won't help at all at this point.

Kamal - you need to answer Arnd's rather simple question: this "k_ftch" parameter you have in your job, what type is it? String, Pathname, what?

And please confirm for me that you did indeed add the "<1>" (no space) at the end of the $CommandOutput string exactly as I noted. Your error implies you did not. :?
Hi,

The execute command stage returns integer value (assume as 5) after executing the unix command(awk 'END{ print NR}' /trace/datasets/seq1.txt).

o/p of execute command stage in sequence:
job_seq..JobControl (@Excmd_file): Executed: awk 'END{ print NR}' /CONSIP/datasets/seq1.txt
Reply=0
Output from command ====>
5


The value (5) must be assigned to "k_ftch" paramter through jobactivity stage . so, i declared in the job "k_ftch" parameter with datatype integer.
--
i added in the jobactivity stage in expression for parameter k_ftch as shown below,
Excmd_file.$CommandOutput:"<1>"

then it is throwing the below warning and sequenc is failed to execute,

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


How to come over this hurdle?

Thanks in advance,
kamal[/u]
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

G.K.K wrote:...
Excmd_file.$CommandOutput:"<1>"
is wrong. Use "Excmd_file.$CommandOutput<1>"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ack... no-one ever mentioned using the concatenation operator and it never occurred to me you'd include the quotes after the full syntax had already been spelled out for you earlier. Oh well.

ps. Don't use the quotes that Arnd included, either. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

chulett wrote:Ack... no-one ever mentioned using the concatenation operator and it never occurred to me you'd include the quotes after the full syntax had already been spelled out for you earlier. Oh well.

ps. Don't use the quotes that Arnd included, either. :wink:
Hi,

i tried as Arnd mentioned without quotes and concatenation. then it is showing error as Expected:Express. in the job activity stage itself. :(

used in job activity stage:
Excmd_file.$CommandOutput<1> ---> but showing error as showing error as Expected:Express

Thanks in Advance,
kamal
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

It may be useful to press ellipse (....) against the parameter name and select from there.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Won't quite help as we need to modify the returned value to get rid of the field marks that are in it. If it doesn't like that array notation (depends on your exact version) then try this instead:

Convert(@FM,"",Excmd_file.$CommandOutput)

And see if it likes that expression (not 'express') more better.
-craig

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