reading external variables does not work

 
...
declare vINIFILE
vINIFILE=$1
...
echo "The name of the File is $vINIFILE" >>mail_tmp
echo "" >> mail_tmp.$$
...
grep RUNJOB=0 $vINIFILE >>tmp_filter
...

So the strange is in echo-statement I get the correct output for $vINIFILE wrtitten into the file mail_tmp. But the grep-statement does not work, tmp_filter is empty, though $vINIFILE has for sure the string RUNJOB=0

I tried everything, replaced

 
grep RUNJOB=0 $vINIFILE >>tmp_filter
grep RUNJOB=0 "$vINIFILE" >>tmp_filter
grep RUNJOB=0 ${vINIFILE} >>tmp_filter

but none of these worked. When I tried to run the statement hardcoded, meaning replaced $vINIFILE by the filename, then it worked.

Can someone help me?

#!/bin/ksh or bash
vINIFILE="$1"
echo "The name of the File is $vINIFILE" 
grep "RUNJOB=0" "$vINIFILE" 

And

chmod a+rx thisscript
./thisscript someinputfilename

Do you get correct output ?
If ok, then add those >> tosomefile

#!/bin/ksh
#!/bin/bash

Use one or the other shell but not both!