read txt from a job sequence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
read txt from a job sequence
Hi Everyone!
I have a date in a txt file.
And I need to call some jobs from a job sequence and send the date in a txt file to all.
What is the best way?
Regards,
Fernando
I have a date in a txt file.
And I need to call some jobs from a job sequence and send the date in a txt file to all.
What is the best way?
Regards,
Fernando
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
In my Server job I have a parameter 'dt' created, should I create a parameter in my sequence job to receive the return of Execute comand stage?chulett wrote:Either a Routine Activity or Execute Command stage can 'cat/type' that file and capture the output. It can then be passed to any downstream job as a job parameter. ...
Fernando
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
chulett wrote:You don't "store" it, the next job can pick up the $CommandOutput variable from the Execute Command stage for example. ...
To try this solution I:
1 - create 2 files
- file1.txt
-In file1.txt I have writed "worked"
- file2.txt
-In file2.txt I do not have anything writed.
2 - create a "Server Job"
- this job has a parameter named value
- this job get the value of parameter and put it in file2.txt
3 - create a "job sequence"
- this job has a "Execute Command Stage", "Job Activity Stage" and a Link between both.
- the "Execute Command Stage" has the following command
- type D:\temp\file1.txt
- the "Job Activity Stage" has Execute_Command_4.$CommandOutput as "Value Expression"
But when I run the "job sequence" show me de following messages:
Info
stemp1..JobControl (@Execute_Command_4): Executed: type D:\temp\file1.txt
Reply=0
Output from command ====>
worked
Warning
stemp1..JobControl (@temp1): Controller problem: Error calling DSSetParam(value), code=-4
[ParamValue/Limitvalue is not appropriate]
Info
stemp1..JobControl (@Coordinator): Summary of sequence run
14:57:38: Sequence started
14:57:38: Execute_Command_4 (COMMAND type D:\temp\file1.txt) started
14:57:38: Execute_Command_4 finished, reply=0
14:57:38: temp1 (JOB temp1) started
14:57:38: Exception raised: @temp1, Error calling DSSetParam(value), code=-4 [ParamValue/Limitvalue is not appropriate]
14:57:38: Sequence failed
Fatal
temp1..JobControl (fatal error from @Coordinator): Sequence job will abort due to previous unrecoverable errors
Can anybody help me?
Fernando
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
I saw that I need to use something likechulett wrote:The Power of Search can help! Search for "ParamValue/Limitvalue is not appropriate" and all will be revealed....
Field(Execute_Command_4.$CommandOutput,@FM,1,1)
but anything different from Execute_Command_4.$CommandOutput the datastage give me the same error.
Job parameter names must begin with an alphabetic character and consist of alpha-numerics and underscores only. If you wish to use a literal value, these must be quoted(").
I using version 7.1!
Can anybody throw some light?
Fernando
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You are on the right track, but may have selected the wrong field number in your Field function. I prefer to convert all the line terminators (@FM) to empty strings and trim extraneous space from the result.
Code: Select all
Trim(Convert(@FM,"",ECActivity.$CommandOutput))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Probably an issue because you are still running 7.1.
Since you can't do this directly in the Sequence job, you'll need to do all of this work inside a routine and make sure what you pass back as the 'Ans' has been properly cleansed there.
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
Since you can't do this directly in the Sequence job, you'll need to do all of this work inside a routine and make sure what you pass back as the 'Ans' has been properly cleansed there.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Weel, is it possible from a "Job Activity Stage" I call a routine and get the rotine return and pass to a job like a parameter?chulett wrote:Probably an issue because you are still running 7.1.![]()
Since you can't do this directly in the Sequence job, you'll need to do all of this work inside a routine and make sure what you pass back as the 'Ans' has been properly cleansed there.
Fernando