Sequence execution contrl based on file data value
Moderators: chulett, rschirm, roy
Sequence execution contrl based on file data value
Hi,
Please help me creating a sequence that will execute based on the value of the file generated in the process.
We have 3 jobs. job1, job2 and job3.
Job1 will read source and write to a sequence file. sequence file will have one field called TYPE. It will containe 1 or 2 for all the records in the file.
It will be input for job2 and job3. We have to execute the job2 or job3 based on the TYPE fileld value in the file generated by job1.
---------- job2
:
Job1 -------------
:
----------- job3
Pleaes let me know how to design the sequence for this flow.
How to assign Type field value to job/sequence parameter in the job1.
or
Without using any unix script inbet ween sequences
Thanks
Please help me creating a sequence that will execute based on the value of the file generated in the process.
We have 3 jobs. job1, job2 and job3.
Job1 will read source and write to a sequence file. sequence file will have one field called TYPE. It will containe 1 or 2 for all the records in the file.
It will be input for job2 and job3. We have to execute the job2 or job3 based on the TYPE fileld value in the file generated by job1.
---------- job2
:
Job1 -------------
:
----------- job3
Pleaes let me know how to design the sequence for this flow.
How to assign Type field value to job/sequence parameter in the job1.
or
Without using any unix script inbet ween sequences
Thanks
Thanks
MRVSR
MRVSR
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
For every record, you say?
Sounds like the easiest approach would be to use this file as the reference input to a Lookup stage at the start of Job2 and Job3 to determine whether to process that record. Run both Job2 and Job3 at the same time, if you have the resources.
Sounds like the easiest approach would be to use this file as the reference input to a Lookup stage at the start of Job2 and Job3 to determine whether to process that record. Run both Job2 and Job3 at the same time, if you have the resources.
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.
Routine to read file and return value
Hi Craig,
Could you please tell me how to write a parallel routine to Read the below file \data\outfile.txt and "field 2" value of the first line.
outfile.txt file contents:
Craig,2,91883
Roy,2,909-88
john ckenix,2,23411
smith,2,12142
Could you please tell me how to write a parallel routine to Read the below file \data\outfile.txt and "field 2" value of the first line.
outfile.txt file contents:
Craig,2,91883
Roy,2,909-88
john ckenix,2,23411
smith,2,12142
Thanks
MRVSR
MRVSR
Hi Craig,
Thanks for solution.
I got one problem in comapring the script out put. The out put of th script is not matching with my condition though the output is same as I have given in the condition.
It is not executing the link with condition which should be true but executing other link(DSLink2).
I tried without UpCase and trim also.
Please see below the output of script and my condtions.
/data/TYPECHK.SH
Reply=0
Output from command ====>
xml
DSLink1:
UpCase(trim(Execute_Command_16.$CommandOutput)) = 'XML'
DSLink2
UpCase(trim(Execute_Command_16.$CommandOutput)) <> 'XML'
Please let me know if I need to do any other formating before checking the values.
Thanks for solution.
I got one problem in comapring the script out put. The out put of th script is not matching with my condition though the output is same as I have given in the condition.
It is not executing the link with condition which should be true but executing other link(DSLink2).
I tried without UpCase and trim also.
Please see below the output of script and my condtions.
/data/TYPECHK.SH
Reply=0
Output from command ====>
xml
DSLink1:
UpCase(trim(Execute_Command_16.$CommandOutput)) = 'XML'
DSLink2
UpCase(trim(Execute_Command_16.$CommandOutput)) <> 'XML'
Please let me know if I need to do any other formating before checking the values.
Last edited by mrvsr on Tue Apr 15, 2008 10:35 am, edited 1 time in total.
Thanks
MRVSR
MRVSR
Output like that is returned in a dynamic array, so you need to either remove any Field Marks (@FM) or just reference the first element. Try:
For example.
Code: Select all
UpCase(trim(Execute_Command_16.$CommandOutput<1>)) = 'XML'
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi,
I tried In execute_command stage and Nested_condition stage.
giving below conditions but still its not working.
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))="XML"
Execute_Command_16.$CommandOutput[1]="xml"
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))='XML'
Execute_Command_16.$CommandOutput[1]='xml'
Execute_Command_16.$ReturnValue='xml'
Execute_Command_16.$ReturnValue=0
I dont understant why it is not able to compare the value which i am giving same as output from script.
Output from command ====>
xml
I tried In execute_command stage and Nested_condition stage.
giving below conditions but still its not working.
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))="XML"
Execute_Command_16.$CommandOutput[1]="xml"
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))='XML'
Execute_Command_16.$CommandOutput[1]='xml'
Execute_Command_16.$ReturnValue='xml'
Execute_Command_16.$ReturnValue=0
I dont understant why it is not able to compare the value which i am giving same as output from script.
Output from command ====>
xml
Thanks
MRVSR
MRVSR
Hi,
I tried In execute_command stage and Nested_condition stage.
giving below conditions but still its not working.
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))="XML"
Execute_Command_16.$CommandOutput[1]="xml"
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))='XML'
Execute_Command_16.$CommandOutput[1]='xml'
Execute_Command_16.$ReturnValue='xml'
Execute_Command_16.$ReturnValue=0
I dont understand why it is not able to compare the value which i am giving as same as output from script.
Output from command ====>
xml[/quote]
I tried In execute_command stage and Nested_condition stage.
giving below conditions but still its not working.
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))="XML"
Execute_Command_16.$CommandOutput[1]="xml"
UpCase(Trim( Execute_Command_16.$CommandOutput[1]))='XML'
Execute_Command_16.$CommandOutput[1]='xml'
Execute_Command_16.$ReturnValue='xml'
Execute_Command_16.$ReturnValue=0
I dont understand why it is not able to compare the value which i am giving as same as output from script.
Output from command ====>
xml[/quote]
Thanks
MRVSR
MRVSR
Hi Craig,
I tried this one also but its giving error at compile as Exprected:expression
Then I replaced <> with [] and compiled. ( I am using Version '8')
UpCase(trim(Execute_Command_16.$CommandOutput<1>)) = 'XML'
also tried
Substrings(UpCase(Trim(Execute_Command_0.$CommandOutput )),1,1)
= 'X'
Substrings(UpCase(Trim(Execute_Command_0.$CommandOutput[1])),1,1) = 'X'
Please let me know if I am still missing any thing.
or is there any way to print Execute_Command_0.$CommandOutput and see the contents
I tried this one also but its giving error at compile as Exprected:expression
Then I replaced <> with [] and compiled. ( I am using Version '8')
UpCase(trim(Execute_Command_16.$CommandOutput<1>)) = 'XML'
also tried
Substrings(UpCase(Trim(Execute_Command_0.$CommandOutput )),1,1)
= 'X'
Substrings(UpCase(Trim(Execute_Command_0.$CommandOutput[1])),1,1) = 'X'
Please let me know if I am still missing any thing.
or is there any way to print Execute_Command_0.$CommandOutput and see the contents
Thanks
MRVSR
MRVSR
Odd, I do that here under 7.x.
Try:
and see if that works.
![Confused :?](./images/smilies/icon_confused.gif)
Code: Select all
Convert(@FM,"",Execute_Command_16.$CommandOutput)="xml"
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers