Page 1 of 1

Pass arguments to Unix script

Posted: Tue Sep 12, 2006 4:21 am
by hhh
I have JobName and JobNo fields whch i want to pass into unix script as arguments.There are number of records for those two fields.

How can i pass JobName and JobNo to unix script ?
Pls suggest your ideas for same.

Posted: Tue Sep 12, 2006 5:15 am
by loveojha2
Meaning for every record you want to execute the script?

For that you can you can use DSExecute call (within the transformer).

Re: Pass arguments to Unix script

Posted: Tue Sep 12, 2006 8:07 am
by prabu
hhh wrote:I have JobName and JobNo fields whch i want to pass into unix script as arguments.There are number of records for those two fields.

How can i pass JobName and JobNo to unix script ?
Pls suggest your ideas for same.
if it is unix specific, Meaning, you want to pass variable argument to a shell script, then it is possbile. check for $# and $@ to get the argument count and values

Posted: Wed Sep 13, 2006 2:20 am
by hhh
I want to use server routine and after getting some job information from each job then want to pass info message to unix for searching the string so i can find Number of i/p records Number of O/p records, rejected records

Can you be more precise about what you want to do? It appears that you want to execute several jobs (why do you need to pass thei ...[/quote]

Posted: Wed Sep 13, 2006 5:29 am
by ray.wurlod
Do you have a consistent naming convention that allows you to identify where the "input", "output" and "reject" links occur? If so, you can use the DSGetLinkInfo() function to retrieve the link row counts.

Posted: Thu Sep 14, 2006 1:04 am
by hhh
In every job design , we have put the same suffix string for ex. files names in first job are abc_SF, def_SF ,ghi_LKP ,jkl_LKP and second job these may aaa_SF,bbb_SF,ccc_SF,ddd_LKP,eee_LKP . I think we cann't use with DSGetLinkInfo(), because we dont have same naming convention except suffix string .


[quote="ray.wurlod"]Do you have a consistent naming convention that allows you to identify where the "input", "output" and "reject" links occur? If so, you can use the DSGetLinkInfo() function to retrieve the link row c ...[/quote]

Posted: Thu Sep 14, 2006 2:51 am
by ray.wurlod
Then you need to think long and hard about how to solve your requirement in a generic fashion.

How DO you define "Input rows"? How do you define "Output rows"? And so on.

Perhaps you could create an after job subroutine and pass it a list of the link names in the job for which you want row counts. That would be fairly easy to do.