Currently I am using shell script to connect nco_sql
(an IBM Netcool executable) functionality in Netcool to connect to its SQL interactive interface. Using that we are querying the Object Server taking input from SQL files(which are created within script based on some conditions). I am now planning to create a python script for same task. I am just stuck with the code part to connect to nco_sql
interface. How can I do that?
I know it can be done by calling the same external command using os.system()
, but I have seen its taking 2-3 secs to complete that task even for fewer events. So, I would be requiring some way to get it done faster(than shell script)
Current code we use for shell script is -
$NCHOME/omnibus/bin/nco_sql -server ObjectServer_name -username user_name -password password < input_file.txt > output_file.txt
It takes input from a file and provides output in a file.