[Info-vax] SYS$FAO coding example in BLISS-32

Hunter Goatley goathunter at goatley.com
Thu Jul 11 23:30:18 EDT 2024


On 7/11/2024 9:55 AM, David Meyer wrote:
> (I posted about this on the VSI forums, but am posting here in case
> there are any old VMS hackers hanging out only here.)
> 
> Does anyone have an code example of calling SYS$FAO in a BLISS program?
> 
> I'm trying to teach myself the language from old manuals and want a way
> to print text and numeric data from programs to my terminal. I've found
> the TUTIO package, but would like to know a method that also works in
> batch mode. SYS$FAO looks like a useful way to format data into
> character strings for output with LIB$PUT_OUTPUT, but I've so far only
> succeeded in printing blank lines, and can only find coding examples in
> MACRO or FORTRAN.
> 
You might take a look at my FREE utility, which displays disk block 
usage summaries for mounted disks.

https://vms.process.com/scripts/fileserv/fileserv.com?FREE

It's written in BLISS and calls SYS$FAO (via the $FAO macro). It also 
shows how to call $DEVICE_SCAN, LIB$PUT_OUTPUT, and $GETDVIW. It's a 
much smaller program than my other BLISS packages that call it. This 
isn't going to wrap correctly, but here's some sample output.

DECUServe$ run free
Device Name      Volume Label   Type      Used Blocks     Free Blocks 
   Total
---------------- -------------- ------ --------------- --------------- 
---------
DSA0:            ALPHASYS       DKX00   15325103 (79%)   4206033 (21%) 
19531136
DSA1:            USER1          DKX00    3920423 (21%)  15610713 (79%) 
19531136
DSA2:            USER2          DKX00   11194730 (58%)   8336406 (42%) 
19531136
[...]

Totals:               13 mounted disks  328010MB (77%)  101353MB (23%) 
429363MB


Hunter
------
Hunter Goatley, Process Software, https://www.process.com/
goathunter at goatley.com  https://hunter.goatley.com/




More information about the Info-vax mailing list