I am using a tcl proc to pass arguements to a Linux script, query a SQL database and put the results of the query into a variable called orderNum.
When I run the tcl proc from the engine testing tool, the echo from the Linux script provides the correct data, but the data is not passed back to the tcl proc. I need to pass it back to a variable so I can insert the order number into a related result message. Can someone help me understand how to set up the globals so this will work. Here is a snippet of the tcl proc, copies of the Linux scripts that are called and the output from the testing tool:
getOrdNumFromSQL.tcl:
set orderNum [exec /home/hci/scripts/ordNumFromSQL.sh $msgDate $patLast $patFirst $patMid $patDOB $patGender $patSSN $ordDoc $resDesc]
echo “orderNum from ordNumFromSQL.tcl proc: $orderNum”
ordNumFromSQL.sh:
#!/bin/sh
tcl /home/hcitest/scripts/ordNumFromSQL.tcl $1 $2 $3 $4 $5 $6 $7 $8