I want to run QNA queries in loops. Is it possible ?
Not sure what you mean.
But potentially you could use the qna.exe to evaluate queries inside of a file, and redirect the output to some other file. You could build a batch or shell script to loop through that then.
Would you mind providing more details on what you’re trying to achieve or what challenge you’re trying to solve? I’m interested in better understanding the context behind the question, and it’ll likely help us provide better answers/feedback .
On unix you can pipe your command/relevance to qna. I could imagine this should work in a loop as well.
My 2 cent … not sure can be useful but on Unix could take advantage of the possibility to put a set of ‘relevance expression’ in a file then run the qna without use interaction:
# cat qna.in
Q: number of processors
Q: name of operating system
# /opt/BESClient/bin/qna qna.in
Default masthead location, using /etc/opt/BESClient/actionsite.afxm
Q: number of processors
A: 8
Q: name of operating system
A: Linux Red Hat Enterprise 9.3
# x=1; while [ $x -le 3 ]; do /opt/BESClient/bin/qna qna.in; x=$(( $x + 1 )); sleep 1; done
Default masthead location, using /etc/opt/BESClient/actionsite.afxm
Q: number of processors
A: 8
Q: name of operating system
A: Linux Red Hat Enterprise 9.3
Default masthead location, using /etc/opt/BESClient/actionsite.afxm
Q: number of processors
A: 8
Q: name of operating system
A: Linux Red Hat Enterprise 9.3
Default masthead location, using /etc/opt/BESClient/actionsite.afxm
Q: number of processors
A: 8
Q: name of operating system
A: Linux Red Hat Enterprise 9.3
#
Or are you asking about how to implement ‘loops’ in relevance statements/queries that you’d run in QNA for instance?
May be this might help.
I still am not certain what the goal is, but there is the client compliance API which might also be relevant to this.