proc main integer iStatus getfile ZMODEM iStatus = $XFERSTATUS while iStatus == 1 iStatus = $XFERSTATUS endwhile if iStatus == 2 ;Transfer successful, continue with script execution elseif iStatus == 3 ;Transfer failed, perform error handling endif endproc