Number of records of a subfile in Qdesgin/UNIX?

Jeff Hoffman wonicon at optusnet.com.au
Fri Sep 21 10:42:00 CDT 2007


Hi

If you want, instead of reporting an error, to you could split files 
65K or more into 2 or more files for loading into excel.
You could just add a number to the end of the file names and do an 
MPUT in your ftp .
As well you would change ERROR "FILE GREATER THAN 65536" something like
INFO "FILE GREATER THAN 65536 - has been split into multiple files" now resp

However I do not know your exact usage for the file.

Jeff

At 07:02 PM 21/09/2007, you wrote:
>Hi Peter,
>
>Your suggestion about a getsystemval of a OS expression doesn't work 
>(or I don't know how to do it work) but Bob should take note of it 
>for future versions of PH.
>
>I've solved my problem (subfile suitable for excel and not empty) with this:
>
>;------------------------------------------------------------
>PROCEDURE INTERNAL VALIDAR_SUBFICHERO
>BEGIN
>  LET TCOMANDO = "$SCRIPTS/comprobar_tamanio.ksh " + TFILE + " 0"
>  RUN COMMAND TCOMANDO NOWARN ON ERROR CONTINUE
>  IF NOT COMMANDOK ; Greater than 0 --> OK
>  THEN
>   BEGIN
>    LET TCOMANDO = "$SCRIPTS/comprobar_tamanio.ksh " + TFILE + " 65536"
>    RUN COMMAND TCOMANDO NOWARN ON ERROR CONTINUE
>    IF NOT COMMANDOK ; Greater than 65536 --> NOT OK
>    THEN
>      ERROR "FILE GREATER THAN 65536"
>   END
>  ELSE
>    ERROR "EMPTY FILE"
>END
>
>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:
>
>wc -l $1 | read TVAR_NUM_REC unwanted
>if [ $TVAR_NUM_REC -gt $2 ] ; then
>  exit 1
>fi
>
>
>Thank you all,
>
>Daniel Rodriguez
>
>
>--
>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Mailing list: powerh-l at lists.sowder.com
>Subscribe: "subscribe" in message body to 
>powerh-l-request at lists.sowder.com
>Unsubscribe: "unsubscribe <password>" in message 
>body to powerh-l-request at lists.sowder.com
>http://lists.sowder.com/mailman/listinfo/powerh-l
>This list is closed, thus to post to the list you must be a subscriber.
>Add 'site:lists.sowder.com powerh-l' to your search terms to search 
>the list archive at Google.



More information about the powerh-l mailing list