CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
fork process

 



ilugopal
Novice

Sep 22, 2016, 4:49 PM

Post #1 of 2 (2263 views)
fork process Can't Post

Hi all -

system ('db2cmd.exe' ,"db2 connect to $database user $username using $password");
system ('db2cmd.exe' ,"db2 -tvf ${OneTime_Dir}test.sql" );

I have connection to the database from the first command however the second command doesn't have the same db connection. I want to execute a the second command on the same session. Any help is appreciated.

thanks
Alan


Laurent_R
Veteran / Moderator

Sep 22, 2016, 11:20 PM

Post #2 of 2 (2261 views)
Re: [ilugopal] fork process [In reply to] Can't Post

Then you have to pack your two commands into the same system statement (making sure they are separated by a new line).

But using a CPAN module to access you database (together with the DBI module) is almost certainly a better solution.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives