How to include the job id and other info in the output file for qsub?

Thats correct

PBS_JOBID gets populated once it has been accepted by the PBS Server. Hence, variable substitution would not work in the PBS Directive.