SDOS MAIL LIST COMPANION No. 2
Mail files, telephone listings, stock listings, etc, all have one thing in common. After the second listing is tucked away in diskette, things degenerate into confusion. “Whos on first, what is in centerfield, and why is the pitcher”. Remember that skit? “LIST LOOKER” is deceiving by its shortness. This utility will look at any LIST FILE that is saved as a Character Array of three dimensions. Example, you have a 100 name array containing “full name, Apartment number, Street address, City and State, plus other data, making each a 7 line field. The “dimension” of the array would be A$(100,7,31), “31” being the number of characters per line. Its kinda hard to see what is in a file just looking at the Disk Directory, isn’t it?
LIST LOOKER will X-RAY that file and show you its bones. When List Looker loads in from disk, a prompt is on screen giving three choices: 1. LOAD an Array, 2. LPRINT Listing, 3. Screen Print Listing. When <1> is elected, you are prompted to “Install Data Disk”, then a touch of ENTER gets the Disk Directory WITH A PROMPT to “ENTER ARRAY TITLE”. If you are like me, your diskettes ae kinda disorganized. So if that directory doesn’t contain the data that you are looking for, just BREAK, type GO TO 5, and you can install another diskette to get its directory and loading prompt.
The data array automatically LOADS after input of its title. Then <3> will get a screen print out of, each of the groups, numbered from 1 to the end number. Example, if there are 50 names and addresses, each will screen print under its field number so that you can identify the names that you may be interested in. The “3. LPRINT LISTING” lets you get a complete print out of all of the listing. This time however, you can select the “number of lines to print”, “TAB”, and “SPACES BETWEEN”. So, what does this do for you? THINK! —- You got it! You can print print LABELS, by input of “4 Fields”, 2 spaces, and 5 for TAB. Or, you can input 7 lines and get whole groups of data fields.
Maybe you dont know how many names and how many lines per name the array has. It really doesn’t matter, as the program “sniffs for total number of fields”, then tells you that, plus the number of lines, at line 130. The INPUTS then governs the print format. This is a excellent “companion utility” to use with mailing list data files generated by “SDOS MAIL MERGE”. Also, it works with “Purity Files”. The three programs go hand in glove to give you complete processing of all kinds of Array Data Files.
THE PROGRAMMING
There are several significant tips of programming in LIST LOOKER. Lets take them line by line. Line 5 (the starting line), gives the <LET/P=0> to initialize the Oliger SAFE printer driver. Other Disk Operating systems will need to have a different program statement here to initialize a printer driver. Then the POKE 23324,10 is to tell the system to give a LINE FEED with each Carriage Return. If your printer does not need a LINE FEED, then Omit this. Then LINE 10 gives the way to CAT the Disk Directory, and put a prompt on the screen directory. After the prompt, the Array Title is LOADED by LOAD/A$DATA Z$().
LINE 90 is executed to LOOK AT the ARRAY and find its DIMENSIONs. The “Z Counter” uses a ON ERR to trip when the Number of Name fields have been counted. The “G Counter” does the same for the Number of Lines”. Then Vars Z and D are used for counter limits in the LPRING routine at line 20 and the Screen Print routine at line 60. This program is short enough to really bite into and discover all of its tricks. Have fun doing it!
LIST LOOKER, the LLIST
5 LET /P=0: POKE 23324,10: BORDER 0: PAPER 0: INK 6: CLS : GO SUB 138: PRINT AT 10,10;"OPTIONS"''TAB 4;"1. LOAD ARRAY"''TAB 4;"2. LPRINT Listing"''TAB 4;"3. Screen Print Listing": INPUT "Input Your Choice? ";a: IF a<1 OR a>3 THEN GO TO 5
7 GO TO (a=1)*10+(a>1)*90
10 CLS : PRINT AT 10,4;"Install Data Disk, ENTER": PAUSE 4E4: CAT : INPUT "Input CHR ARRY TITLE";A$: LOAD /A$ DATA Z$(): GO TO 5
20 CLS : FOR N=Z1 TO Z2: ON ERR GO TO 40: IF Z$(N,1)(1)=" " THEN STOP
25 IF C>4 THEN LPRINT TAB TB;n
30 FOR Y=1 TO C: LPRINT TAB 10;Z$(N,Y): NEXT Y: FOR M=1 TO SX: LPRINT : NEXT m
35 IF tw=1 THEN FOR Y=1 TO C: LPRINT TAB 10;N$(Y): NEXT Y: FOR M=1 TO SX: LPRINT : NEXT m
38 NEXT n
40 ON ERR RESET : GO TO 5
60 CLS : FOR N=1 TO Z: ON ERR GO TO 80: IF Z$(N,1)=" " THEN STOP
70 PRINT n: FOR Y=1 TO D: PRINT Z$(N,Y): NEXT Y: PRINT : NEXT N
80 ON ERR RESET : PRINT ''"ENTER WHEN READY": PAUSE 4E4: GO TO 5
90 FOR Z=1 TO 200: ON ERR GO TO 100: LET C=LEN Z$(Z,1): IF Z$(Z,1)(1)=" " THEN STOP
95 NEXT Z
100 ON ERR RESET : LET Z=Z-1: FOR G=1 TO 100: ON ERR GO TO 110: LET C=LEN Z$(1,G): NEXT g
110 ON ERR RESET : LET D=G-1
120 IF a=3 THEN GO TO 60
130 CLS : PRINT AT 10,0;"The Array has ";D;" Fields."''AT 12,0;"Input Nbr of Fields to Print. "''"( 4 for Labels )": INPUT C: CLS : INPUT "Input Start Nbr. ";Z1: INPUT "Input END Nbr. ";Z2: INPUT "Input TAB: ";TB: INPUT "Input Spaces Between: ";SX
132 CLS : IF c<5 THEN INPUT "Twin Labels? <1> Yes- <2> No ";TW
136 CLS : GO TO 20
138 DIM n$(4,31): LET n$(1)="TS-2068 UP-DATE": LET n$(2)="1317 Stratford Ave.": LET n$(3)="Panama City, FL 32404": RETURN
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.