The shell command

can anyone help me on the working of the below statement.

I would have written that command with this equivalent syntax:

${xyz_pgm}.sh $store >${pidlogfile}_${store} 2>&1 & 

It executes a program which has its unsuffixed name contained in the xyz_pgm variable passing the parameter defined in the store variable.
Both of its standard and error outputs go to a file which has its name built with the pidlogfile and store variables joined with an underscore.

Needs an "eval" command to make shell generate the command at runtime? Also all variables should be in braces ready for the eval.

eval ${xyz_pgm}.sh ${store} >>${pidlogfile}_${store} 2>&1 &  

Needs no echo I'm pretty sure.

$ XYZ=echo
$ $XYZ asdf
asdf
$

"eval" isn't necessary in that case and might actually pose a security risk in the worst case.

Braces (or quotes for that matter) are only required to delimit a variable name when it is concatenated to something else. It has no effect on an isolated variable like "store" here and has no specific meaning for eval.

Thanks jlliagre. I didn't take account of the fact that only the contents of the variable were changing not the name of the variable itself.

The security hole in "eval" turned out to be interesting and rather too easy to prove.