RUN ping 10.90.1.2 > c:\ping.txt && ping the server to file ping.txt
** RUN ping 10.1.1.8 > c:\ping.txt && local test ping
** create a cursor to capture the txt file
CREATE CURSOR temp (stuff c(80))
SELECT temp
APPEND FROM c:\ping.txt sdf && append txt file to cursor
GO BOTTOM && 2nd to last line contains fields of interest
SKIP -1
pingmin = INT(VAL(SUBSTR(stuff,AT('ms',temp.stuff,1)-3,3))) && 1st occur of 'ms'
pingmax = INT(VAL(SUBSTR(stuff,AT('ms',temp.stuff,2)-3,3))) && 2nd
pingave = INT(VAL(SUBSTR(stuff,AT('ms',temp.stuff,3)-3,3))) && 3rd
USE IN temp
DELETE FILE c:\ping.txt
RETURN pingmin, pingmax, pingave