Operating System - HP-UX
1833569 Members
4509 Online
110061 Solutions
New Discussion

Re: executing sprintf function

 
diwa
Frequent Advisor

executing sprintf function

Hi,

I am using one .prg file, in which i am executing statement

cmd = sprintf("%s %s %d",SCRIPT, filename, trans_seq);
system(cmd);

Basically it will excute this cmd and pass these three argument to one sql file(SCRIPT). And then ecuting the sql file.

But when i am trying to pass one more agument through this sprintf cmd like
cmd = sprintf("%s %s %d %s",SCRIPT, filename, trans_seq,orgid);

It is not populating in sql file.

Is any limit that no of arguemnts we can pass or any other issues.

Value of orgid is 5106.

Thanks
2 REPLIES 2
diwa
Frequent Advisor

Re: executing sprintf function

Hi All,

Appologies actually i was giving wrong value of agument like i was giving $4 in sql file.
While right value is $3 for orgid.

Thanks
diwa
Frequent Advisor

Re: executing sprintf function

I got solution of my problem. Problem is now solved.