Hi Peter,<br><br>Your suggestion about a getsystemval of a OS expression doesn&#39;t work (or I don&#39;t know how to do it work) but Bob should take note of it for future versions of PH.<br><br>I&#39;ve solved my problem (subfile suitable for excel and not empty) with this:
<br><br>;------------------------------------------------------------<br>PROCEDURE INTERNAL VALIDAR_SUBFICHERO<br>BEGIN<br>&nbsp;LET TCOMANDO = &quot;$SCRIPTS/comprobar_tamanio.ksh &quot; + TFILE + &quot; 0&quot;<br>&nbsp;RUN COMMAND TCOMANDO NOWARN ON ERROR CONTINUE
<br>&nbsp;IF NOT COMMANDOK ; Greater than 0 --&gt; OK<br>&nbsp;THEN<br>&nbsp; BEGIN<br>&nbsp;&nbsp; LET TCOMANDO = &quot;$SCRIPTS/comprobar_tamanio.ksh &quot; + TFILE + &quot; 65536&quot;<br>&nbsp;&nbsp; RUN COMMAND TCOMANDO NOWARN ON ERROR CONTINUE<br>&nbsp;&nbsp; IF NOT COMMANDOK ; Greater than 65536 --&gt; NOT OK
<br>&nbsp;&nbsp; THEN<br>&nbsp;&nbsp;&nbsp;&nbsp; ERROR &quot;FILE GREATER THAN 65536&quot;<br>&nbsp; END<br>&nbsp;ELSE<br>&nbsp;&nbsp; ERROR &quot;EMPTY FILE&quot;<br>END<br><br>Where TFILE is the name of the subfile and $SCRIPTS/comprobar_tamanio.ksh is a Unix shell script that returns an error if the number of records of the file received as a parameter is greater than the number passed as second parameter:
<br><br><span style="font-style: italic;">wc -l $1 | read TVAR_NUM_REC unwanted</span><br style="font-style: italic;"><span style="font-style: italic;">if [ $TVAR_NUM_REC -gt $2 ] ; then</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;exit 1</span><br style="font-style: italic;"><span style="font-style: italic;">fi</span><br style="font-style: italic;"><br><br>Thank you all,<br><br>Daniel Rodriguez<br><br><br>