We faced this problem recently when implementing MVS dataset support for SFTP. (The SFTP protocol works much better if the server can provide at least an estimate of the file size in bytes). It is not feasible read the entire dataset to find out the size, since the server provides sizes whenever the client lists the attributes of one or more datasets.
Our estimate was based on: (used bytes per track) * used tracks Where "used bytes per track" was calculated using the track size, block size, and RECFM. The "TRKCALC FUNCTN=TRKCAP" macro comes in very handy for calculating the capacity of a track. Of course, this only gives you an estimate, which can be skewed by: - Variable sized blocks (smaller blocks have more overhead) - last track not full - text mode transfers with trailing-blank trimming enabled Kirk Wolf Dovetailed Technologies http://dovetail.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

