Requirement:
1) Pass multiple parameters from flat file to parallel job.
2) Parameters to be used globally by other jobs.
Flat File's Content:-
FILE_NAME=abc.txt
START_DATE=20080526
END_DATE=20080531
Currently, I managed to use a Execute Command to pass a SINGLE parameter to a Job Activity. However, DS doesn't allows multiple inputs.
Execute Command: grep FILE_NAME flatFilePath | cut -d"=" -f2
Job Activity: Field(hello.$CommandOutput,@FM,1,1)
TIA
Pass multiple parameters from flat file to job sequence
Moderators: chulett, rschirm, roy
You can manage with the same script in the job activity stage.Execute Command: grep FILE_NAME flatFilePath | cut -d"=" -f2
Job Activity: Field(hello.$CommandOutput,@FM,1,1)
You can write a small shell script which will return you the all the values from the file in predefined order seperated by a delimiter.
The shell script may look like
FILE_NAME=`grep FILE_NAME flatFilePath | cut -d"=" -f2 `
START_DATE=`grep START_DATE flatFilePath | cut -d"=" -f2 `
and so .. on
the last line will be
echo $FILE_NAME $START_DATE " "
Then in the job activity stage you can extract the individual parameter
like
Field(hello.$CommandOutput,@FM,1,1)
Field(hello.$CommandOutput,@FM,2,1)
so on..
for this purpose you can write basic subroutine too.
Hope this will help you.
Birendra
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
Specify the parameters in a Parameter Set, and specify in the Parameter Set the file from which the default values are to be obtained.
You can specify different files for different projects (for example development, test, production).
Specify the parameters in a Parameter Set, and specify in the Parameter Set the file from which the default values are to be obtained.
You can specify different files for different projects (for example development, test, production).
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.