Hi All,
I have a job which uses the filter stage to impose conditions on specific column data.
I had parameterized this condition and could test the same successfully when I ran the job in datastage.
However while designing the sequence I had intended to pass the value by reading a file in UNIX which stores the condition.
My sequence was designed as follows
Execute Command Stage -----> Job Activity
Execute Command Stage ===> cat test.txt
Job Activity ===> pass the command output of the Execute command stage to the filter parameter of job1
The file test.txt had the condition: MODIFIED_USER = "ABC"
MODIFIED_USER denotes the column name
The sequence continued to throw errors regarding invalid parameter value/limit value.
I tried to trim the command output but the same error persisted.
I tried to use some or the String funtions hoping that I could pass the value but looks like everytime the sequence just aborted.
Any ideas about how this could be solved.
Thanks
Filter Stage parameterization
Moderators: chulett, rschirm, roy
I had exactly the same issue, fixed as follows:
I think the problem is that DataStage will treat the output from the cat command as separate records - each line (or record) will be suffixed with a field marker @FM.
Use the following syntax to extract your value:
Trim(Field(ExecCmdStage.$CommandOutput,@FM,1))
The Trim makes sure the single field has no spaces and may be surplus to your requirements. The Field part is what's important here.
I think the problem is that DataStage will treat the output from the cat command as separate records - each line (or record) will be suffixed with a field marker @FM.
Use the following syntax to extract your value:
Trim(Field(ExecCmdStage.$CommandOutput,@FM,1))
The Trim makes sure the single field has no spaces and may be surplus to your requirements. The Field part is what's important here.