perm filename FREE.SAI[USE,CSR] blob sn#611569
filedate 1981-09-14 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00002 00002 begin "free"
comment this will scan the address file, creating another file containing
the addresses of all customers who are classed as "free". The list
will be in FREE.DSK;
comment The method is to move through the address file, one entry at a time.
If the entry is in the free class (first character after the * is
F) copy the address into the target file;
define crlf = "('15&'12)";
define ff = "'14";
integer flag, ichan, ochan, baddr, brchar;
comment Set breaktable, to read one address;
comment Open channels for input and output;
if flag then print("Can't find address file.",crlf);
if flag then print("Can't open target file.",crlf);
comment The main loop. Proceed through the address file one at a time;
do begin "next address"
if addr="F" then
out(ochan,"*"&(if addr[∞ to ∞]=ff then addr[1 to ∞-1] else addr));
end "next address"