Surround the processing with some conditional statements which check for results being present. For example:
Code:when(mysig=v("/out" ?result "pss-fd.pss" ?resultsDir "/proj/work_libs/jm/cds/simulation/vco_sim1/spectre/schematic")
pn10k = value((-dB20(ymax(mag(mysig)) ...
printf( "%6.2e \n" pn10k)
) ; when
If the v("/out") returns nil, it won't execute the code which fails due to invalid values.
Regards,
Andrew.