Pass arguments to Unix script

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hhh
Participant
Posts: 86
Joined: Tue Aug 02, 2005 7:39 am

Pass arguments to Unix script

Post 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.
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Meaning for every record you want to execute the script?

For that you can you can use DSExecute call (within the transformer).
Success consists of getting up just one more time than you fall.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Re: Pass arguments to Unix script

Post 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
hhh
Participant
Posts: 86
Joined: Tue Aug 02, 2005 7:39 am

Post 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]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
hhh
Participant
Posts: 86
Joined: Tue Aug 02, 2005 7:39 am

Post 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]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply