home *** CD-ROM | disk | FTP | other *** search
- ** Last revision: April 17, 1986 at 18:54
- * list.ag
- * this module makes a list of all information in the file
- * get a starting and ending points in file
- STOR 'A' TO stletter
- @ 17,12 SAY 'Letter of alphabet at which to start report'
- @ 17,57 GET stletter PICTURE '!'
- READ
- STOR 'Z' TO llet
- @ 18,12 SAY 'Letter of alphabet at which to end report'
- @ 18,57 GET llet PICTURE '!'
- READ
- CLEA GETS
- STOR ASC(llet)+1 TO finish
- * goto starting point or next if no find
- IF stletter = 'A'
- GO TOP
- ELSE
- SEEK stletter
- DO WHIL (EOF() .OR. BOF())
- STOR ASC(stletter) + 1 TO start1
- STOR CHR(start1) TO stletter
- SEEK stletter
- ENDD whil #
- ENDI stletter
- * initialize variables
- STOR 0 TO pageno
- STOR .t. TO more2
- SET MARGIN TO 10
- DO WHIL more2
- * do page counter etc
- STOR pageno + 1 TO pageno
- STOR 6 TO lineno
- CLEAR
- * eject a page and skip down 1 line
- IF printer = 'Y'
- SET PRINT ON
- EJEC
- ENDIF
- ? ' '
- * and write TITLE
- ? '========================== MAILING LIST ======================'
- ? ' '
- ? ' ' + DTOC(date()) + ' PAGE: '+ STR(pageno,3)
- ? ' '
- * now fill up rest of page to 55 lines with names etc
- DO WHIL lineno < 55
- * now do a page if not end of file
- IF .NOT. EOF()
- ? '-------------------------------------------------------------------'
- STOR lastname TO lname
- IF ASC(lastname) <= finish
- ? ' ' + "Name: "+ TRIM(mr)+' ' + TRIM(fname) +' ' + lastname
- ? ' ' + "Spouse: " + spouse + "Address as: " + dear
- ? ' ' + "Title: " + title
- ? ' ' + "Company: " + company1
- ? ' ' + " : " + company2
- ? ' ' + "Address: " + TRIM(caddress) + " " + suite
- ? ' ' + " " + TRIM(ccity) +' ' + cst + ' ' +czip
- ? ' ' + "Home address: " + TRIM(address) + " " + apt
- ? ' ' + " " + TRIM(city) +' '+ st + ' ' +zip
- ? ' ' + 'Phones - office: ' + ophone + ' home: ' + phone
- ? ' ' + "List: " + cs1 + " Code: " + cs2
- ? ' ' + "Send to office: " + send
- ? ' ' + "Date update: " + update
- STOR lineno +13 TO lineno
- SKIP
- * if deleted, skip again
- IF DELETE()
- SKIP
- ENDI
- ELSE
- STOR .f. TO more2
- STOR 60 TO lineno
- ENDI RANK(lname)
- ELSE
- STOR .f. TO more2
- STOR 60 TO lineno
- ENDI .NOT. EOF
- ENDD while lineno < 55
- ENDD more2
- * if it was on turn it off
- IF printer = 'Y'
- EJEC
- ENDIF
- SET MARGIN TO 0
- SET PRINT OFF
- SET ALTERNATE OFF
- SET MARGIN TO 0
- RETURN
-
-
-