(ISTAT('DISKSPACE'))
DISKSPACE returns the amount of free disk space on the current drive. If you wish to check for the free space on drives with over 2 gigabytes of free you must use syntax similar to this:
SET VAR vSpace DOUBLE = (ISTAT('DISKSPACE'))
This is necessary because the default data type returned by the function, INTEGER, cannot hold the required number of digits to report over 2 gigabytes of free space.
When depending on this routine it is best to test it on a platform as close to your target platform as possible.