%%database "phonedir.txt" %%define DELIM | %%define NAMCOL %%define TEXEXT .lst %%sorton %LASTNAME %FIRSTNAME %%header PHONE DIRECTORY %%record NAME: %FIRSTNAME %LASTNAME JOB: %JOB CONTACT: %ROOM, x#isprivate(%EXTENSION) %%end %%equate isprivate(extn) /* if the first character of the extension is the number 4 (in ascii) then return "PRIVATE" else return the extension */ if extn'0 = 52 then outputs("PRIVATE") else outputs(extn) endif