In Hypermesh, when using *createmark, I am trying to use the "by all nodes" option to select elements

I stored a list of nodes in a variable named lst_nodes, and further I use this variable in the command below
*createmark elems 1 "by all nodes" $lst_nodes
When this statement is executed, the elements associated with the first node item in the list 'lst_nodes' is added to the mark.
All other elements associated with the other node items in the list are not added to the mark.
I would like to know how to fix this issue.
Thanks in advance
Regards,
Akash P