[Info-vax] What are my current process units - blocks or bytes ?

geze...@rlgsc.com gezelter at rlgsc.com
Thu Aug 27 05:36:33 EDT 2020


On Thursday, August 27, 2020 at 2:57:01 AM UTC-4, sumdavar lonely wrote:
> Hi, 
> There is the command "set process/units=", with two options: bytes or blocks. 
> Suppose I write a DCL procedure to calculate free space, and, within my procedure I want to set the units to bytes. In the procedure, I want to save 
> the current units of the process, set to my preferred units, do the calculations, and eventually restore to the original units. 
> 
> How can I get the current units of my process (bytes or blocks) ? 
> 
> Thanks, 
> S.D.
Sumdavar,

As described in the HELP, SET PROCESS/UNITS affects the (emphasis mine) DISPLAY of the units in various commands, to wit, COPY, DIRECTORY, DELETE, PURGE, SHOW DEVICE, SHOW MEMORY, and SHOW QUOTA. It does not affect the values returned by DCL lexical functions. Thus, the lexical function F$GETDVI(device, "FREEBLOCKS") returns the number of blocks, regardless of SET PROCESS/UNITS/

It would probably be a good idea if VSI enhanced F$GETJPI to include a "DISPLAY_UNITS" request, so that command procedures can retrieve and subsequently restore the display state as needed. Actually, it would be a good policy with such settings in general.

- Bob Gezelter, http://www.rlgsc.com



More information about the Info-vax mailing list