home *** CD-ROM | disk | FTP | other *** search
- 10 iffl=0thenfl=1:load"dp] dos5.1",8,1
- 11 iffl=1thenfl=2:sys52224:rem(c)commodore
- 600 fore=0to24:poke54272+e,0:next:poke54296,15:goto1500
- 602 poke54277,58:poke54278,16:poke54273,35:poke54272,134
- 604 poke54276,33:fore=1to100:next:poke54276,16:return
- 1500 rem dfprint 1.7 for datafile (c)1983-1986 by mike konshak
- 1502 clr:print"[147][158]":poke53281,0:poke53280,0:open4,4:open3,3
- 1504 d$="":b$=chr$(32):forj=1to80:s$=s$+b$:nextj:pf=4:mf$=d$:rf$=d$:p=0
- 1506 nc=0:nl=0:pl=0:f1=0:f2=0:f3=0:l$=d$:rl=0:sb$=d$:cr$=chr$(13)
- 1508 a$=d$:c$=d$:t%=6:i=0:j=0:k=0:m=0:n=0:rw=5:sf=0:z=0:e$="eof"
- 1510 en=0:em$=d$:et=0:es=0:a1$=d$:a2$=d$:a3$=d$:rw=5:lw=34:lt=1:l=0
- 1512 rem-arrays
- 1514 dim ml$(17,4),pc(18),tt$(5),hc$(17),rp$(17,4),lp(5),r$(5)
- 1516 dim f$(31),t%(31),l%(31),rec$(31)
- 1518 lp(1)=1:lp(2)=37:lp(3)=73:lp(4)=109:goto1530
- 1520 rem-get
- 1521 print"[158] press the appropriate key ":return
- 1522 geta$:ifa$=""then1522
- 1524 return
- 1526 rem-start
- 1528 print"[147] datafile fast print program ":goto1548
- 1530 print"[147] datafile fast print rev 1.7 "
- 1532 print" by mike konshak (c)1986 "
- 1534 print"[153] this program will format and print a"
- 1536 print" seq[146] file, which was previously created"
- 1539 print" by [158]datafile[153][146], directly from the disk"
- 1540 print" to the printer. the order of the"
- 1542 print" records will be the same as the most"
- 1544 print" recent sort as written in the current"
- 1546 print" file.":print"[158] press any key[146][158] to continue"
- 1547 gosub1522:gosub2856:goto1528
- 1548 printtab(5)"o[153][146]pen record file on disk"
- 1550 iffl>0thenprinttab(5)"r[153][146]epeat record file: [146]"nf$"[158][146]"
- 1551 printtab(5)"$[153][146] disk directory 4[153][146]"
- 1552 printtab(5)"q[153][146]uit program"
- 1553 print" transfer to:"
- 1554 printtab(5)"d[153][146] datafile dbms"
- 1555 printtab(5)"c[153][146] dfcalc calculated reports"
- 1556 gosub1521
- 1558 gosub1522:ifa$="$"ora$="4"thengosub1628:goto1528
- 1559 ifa$="d"thenprint"[147][144]load"chr$(34)"datafile 3.6"chr$(34)",8":goto1565
- 1560 ifa$="o"thenfl=1:goto1572
- 1561 ifa$="c"thenprint"[147][144]load"chr$(34)"dfcalc"chr$(34)",8":goto1565
- 1562 ifa$="r"then1584
- 1563 ifa$="q"thenclose5:close15:close3:close4:end
- 1564 gosub602:goto1558
- 1565 print:print:print:print:print"run[158]"
- 1566 poke631,19:poke632,13:poke633,13:poke634,13:poke635,13:poke636,13
- 1568 poke198,6:new:end
- 1570 rem-file name
- 1572 print"[153][147] available record files are:[158]":@"$0:df]*"
- 1573 print"[153]name of record file to be printed[158]"
- 1574 print" ";nf$:input"[145] ";nf$:ifnf$=""thenfl=0:goto1528
- 1576 open15,8,15
- 1578 open5,8,5,"0:df] "+nf$+",s,r":gosub1618:ifen=62thengosub1620:fl=0:goto1528
- 1579 input#5,r,f,x:gosub1618:ifet=8then1528
- 1580 forn=1tof:input#5,f$(n),l%(n):nextn:gosub1618:ifet=8then1528
- 1582 close5:close15
- 1583 rem-print menu
- 1584 print"[158][147] record printout menu "
- 1585 print"[153] print options:";:ifk<>0thenprint:goto1587
- 1586 print"[150]no formats present[158]"
- 1587 printtab(4)"u[153][146]nformatted list"
- 1588 printtab(4)"r[153][146]eport format [158]"rf$
- 1590 printtab(4)"m[153][146]ailing labels [158]"mf$
- 1591 print"[153] configure:"
- 1592 printtab(4)"l[153][146]abels:[158]"rw"[153]rows,[158]"lw"[153]chrs,[158]"lt"[153]across"
- 1594 printtab(4)"p[153][146]rinter: option[158]"p;:ifp=4thenprint"[157][157]screen[146]";
- 1595 print:printtab(4)"$[153][146] disk directory 4[153][146]"
- 1596 printtab(4)"e[153][146]xit to restart"
- 1598 gosub1521
- 1600 gosub1522:ifa$="" then1600
- 1602 ifa$="u"thenk=1:goto1730
- 1604 ifa$="r"thenk=2:goto3118
- 1605 ifa$="$"ora$="4"thengosub1628:goto1584
- 1606 ifa$="e"then1528
- 1608 ifa$="m"thenk=3:goto3118
- 1610 ifa$="l"then1940
- 1612 ifa$="p"thengosub2856:goto1584
- 1614 gosub602:goto1600
- 1616 rem-disk error
- 1618 input#15,en,em$,et,es:if(en<20)or(en=62)thenet=0:return
- 1620 print" [150]disk error[146]"en"[157], "em$","et"[157],"es"[158]":et=8
- 1622 print"[153] press any key[153][146] to restart program[158]"
- 1624 gosub1522:close5:close15:return
- 1626 rem-directory
- 1628 print"[147][158]";:@"$":printtab(25)"[153]press any key[158][146]":gosub1522:return
- 1666 rem-load report
- 1668 print"[153][147] available report files are[158]:":@"$0:rp]*"
- 1669 print"[153] name of report format file?[158]"
- 1670 print" [158]";nf$:input"[145] ";rf$:ifrf$=""then1528
- 1672 open15,8,15:open5,8,5,"0:rp] "+rf$+",s,r":gosub1618:ifet=8then1528
- 1674 ifen=62thengosub1620:goto1528
- 1676 input#5,pw,nl,nc:gosub1618:ifet=8then1528
- 1678 forj=1tonl
- 1680 input#5,tt$(j):gosub1618:ifet=8then1528
- 1682 nextj
- 1684 fori=1tonc
- 1686 input#5,pc(i),hc$(i):gosub1618:ifet=8then1528
- 1688 forn=1to3
- 1690 input#5,rp$(i,n):gosub1618:ifet=8then1528
- 1692 nextn:nexti:input#5,a1$:z=val(a1$)
- 1694 s=st:ifs<>0then1698
- 1696 input#5,e$
- 1698 close5:close15
- 1700 goto2980
- 1702 rem-load label
- 1704 print"[153][147] available label files are:[158]":@"$0:ml]*"
- 1705 print"[153] name of mailing label format file?"
- 1706 print" [158]";nf$:input"[145] ";mf$:ifmf$=""then1528
- 1708 open15,8,15:open5,8,5,"0:ml] "+mf$+",s,r":gosub1618:ifet=8then1528
- 1710 ifen=62thengosub1620:goto1528
- 1712 input#5,rw
- 1714 fori=1torw:forn=1to3
- 1716 input#5,ml$(i,n):gosub1618:ifet=8then1528
- 1718 nextn
- 1720 nexti
- 1722 s=st:ifs<>0then1726
- 1724 input#5,e$
- 1726 close5:close15:goto3068
- 1728 rem-open file
- 1730 print"[147] positioning drive..."
- 1731 open15,8,15:open5,8,5,"0:df] "+nf$+",s,r":gosub1618:ifet=8then1528
- 1732 ifen=62thengosub1620:goto1528
- 1734 input#5,r,f,x:gosub1618:ifet=8then1528
- 1738 forn=1tof:input#5,f$(n),l%(n):nextn:gosub1618:ifet=8then1528
- 1740 rem-options
- 1742 a0=0:pg=1:pl=0:l=0:print"[147] [158] print options menu "
- 1743 print"[153] there are [158]"x"[146][153]records in [158]"nf$
- 1744 printtab(4)"a[153][146]ll records in file
- 1746 [153][163]4)"fprintwaitind records with common fields
- 1748 ifk=3andpf=4thenprinttab(4)"t[153][146]est label(s)"
- 1750 printtab(4)"e[153][146]xit back to start"
- 1752 ifk=2thenprint"[153]position paper in printer at top of page"
- 1754 gosub1521
- 1756 gosub1522
- 1758 ifa$="a"then1806
- 1762 ifa$="t"then1918
- 1764 ifa$="f"then1772
- 1766 ifa$="e"thenclose5:close15:goto3118
- 1768 gosub602:goto1756
- 1770 rem-find
- 1772 print"[158][147] find records with common items "
- 1774 forn=1tof:print" ";n;"[153][146] ";f$(n):nextn
- 1776 input" which field is to be searched";sf
- 1778 ifsf<0orsf>fthenprint"[145][145][145]":goto1776
- 1780 print"[153] enter common item[153][146] ":print" (the entire string is not required)"
- 1782 print" ";f$(sf);"[158][146] ";:inputt$
- 1784 print"[147]":ifk=2thengosub1838:gosub1852
- 1786 fori=1tox
- 1788 ifp<>4thenprint" searching record";i;"[145][145]"
- 1790 forn=1tof:input#5,rec$(n):ifrec$(n)=">"thenrec$(n)=" "
- 1791 nextn:gosub1618:ifet=8then1528
- 1792 ift$=left$(rec$(sf),len(t$))thenonkgosub1826,1870,1928:ifk=2thengosub1904
- 1796 nexti
- 1797 ifl>0andk=3thengosub1936
- 1798 close5:close15
- 1800 ifk=2then1906
- 1801 ifp=4thenprint"[153]press any key[158][146]":gosub1522
- 1802 goto1730
- 1804 rem-print all
- 1806 gosub2898:pl=0:print"[147][158]":ifp<>4andk=2thenprint"[147] printing heading"
- 1807 ifk=2thengosub1838:gosub1852
- 1808 fori=stox:ifp<>4thenprint"[145] reading record #"str$(i)" of"str$(x)
- 1810 forn=1tof:input#5,rec$(n):ifrec$(n)=">"thenrec$(n)=" "
- 1811 nextn:gosub1618:ifet=8then1528
- 1812 onkgosub1826,1870,1928
- 1814 ifk=2thengosub1904
- 1816 nexti
- 1818 close5:close15
- 1820 ifk=2then1906
- 1822 goto1801
- 1824 rem-nonformatted
- 1826 print#pf,"[ record #";i;" ]";:forj=1to61:print#pf,"-";:nextj:gosub2888
- 1828 pl=pl+1:forn=1tof
- 1830 print#pf,f$(n);:forj=1to20-len(f$(n)):print#pf,".";:nextj
- 1831 ifrec$(n)=">"thenrec$(n)=" "
- 1832 print#pf,rec$(n):pl=pl+1:nextn:gosub2888:pl=pl+1
- 1834 ifpl+f<=60thenreturn
- 1835 forj=1to65-pl:gosub2888:nextj:pl=0:pg=pg+1:print#pf,"page"pg:return
- 1836 rem-title
- 1838 forj=1tonl:iftt$(j)<>">"thengosub1846
- 1842 nextj:return
- 1846 b=int((pw-len(tt$(j)))/2):ifp<>1then1849
- 1848 print#pf,left$(s$,b)+tt$(j);b1$;:pl=pl+1:return
- 1849 print#pf,left$(s$,b)+tt$(j);b1$:pl=pl+1:return
- 1850 rem-headings
- 1852 gosub1866:pc(nc+1)=pw+3:cw=pc(2)-2-pc(1):ifpc(1)>1then1856
- 1854 print#pf,left$(hc$(1),cw);:goto1858
- 1856 print#pf,left$(s$,pc(1)-1)+left$(hc$(1),cw);
- 1858 ifnc=1then1862
- 1859 forj=2tonc:m=pc(j)-len(left$(hc$(j-1),pc(j)-2-pc(j-1)))-pc(j-1)
- 1860 print#pf,left$(s$,m)+left$(hc$(j),pc(j+1)-2-pc(j));
- 1861 nextj
- 1862 gosub2888:gosub1866:pl=pl+3:return
- 1864 rem-dashes
- 1866 forj=1topw:print#pf,"-";:nextj:gosub2888:return
- 1868 rem-data
- 1870 f1=val(rp$(1,1)):f2=val(rp$(1,2)):f3=val(rp$(1,3)):cw=pc(2)-2-pc(1)
- 1871 ifnc=1andz=1thenclm$=rec$(val(rp$(1,1))):gosub3148:goto1896
- 1872 ifpc(1)>1then1878
- 1874 print#pf,left$(rec$(f1)+b$+rec$(f2)+b$+rec$(f3),cw);
- 1876 goto1882
- 1878 print#pf,left$(s$,pc(1)-1);
- 1880 print#pf,left$(rec$(f1)+b$+rec$(f2)+b$+rec$(f3),cw);
- 1882 ifnc=1then1896
- 1883 forj=2tonc:cw=pc(j)-2-pc(j-1)
- 1884 f1=val(rp$(j-1,1)):f2=val(rp$(j-1,2)):f3=val(rp$(j-1,3))
- 1886 m=len(left$(rec$(f1)+b$+rec$(f2)+b$+rec$(f3),cw))
- 1888 m=pc(j)-m-pc(j-1):cw=pc(j+1)-2-pc(j)
- 1890 print#pf,left$(s$,m);
- 1891 ifj=ncandz=1thenclm$=rec$(val(rp$(j,1))):gosub3148:goto1896
- 1892 f1=val(rp$(j,1)):f2=val(rp$(j,2)):f3=val(rp$(j,3))
- 1894 print#pf,left$(rec$(f1)+b$+rec$(f2)+b$+rec$(f3),cw);
- 1895 nextj
- 1896 gosub2888:pl=pl+1
- 1898 ifpl=60thenforj=1to5:gosub2888:nextj:pl=0:goto1901
- 1900 return
- 1901 pg=pg+1:print#pf,"page"pg:gosub1852:return
- 1902 rem-sum
- 1904 ifz<>1thenreturn
- 1905 a0=a0+val(rec$(val(rp$(nc,1)))):return
- 1906 ifz<>1then1914
- 1908 print#pf,left$(s$,pc(nc)-1);
- 1910 fori=1topw-pc(nc)+1:print#pf,"-";:nexti:gosub2888
- 1911 ifnc=1then1913
- 1912 print#pf,left$(s$,pc(nc)-9)+"total= ";
- 1913 clm$=str$(a0):gosub3148:pl=pl+2
- 1914 gosub2888:ifpf=4thenfori=1to66-pl:gosub2888:nexti
- 1915 goto1801
- 1916 rem-test
- 1918 print" printing test label"
- 1920 fori=1torw:forj=1tolw:print#pf,right$(str$(j),1);:nextj:gosub2888:nexti
- 1922 fori=1tot%-rw:gosub2888:nexti
- 1924 goto1742
- 1926 rem-labels
- 1928 l=l+1:forj=1torw:f1=val(ml$(j,1)):f2=val(ml$(j,2)):f3=val(ml$(j,3))
- 1930 rw$(j)=rw$(j)+left$(rec$(f1)+b$+rec$(f2)+b$+rec$(f3)+s$,lw)+b$+b$:nextj
- 1932 ifi>=xthen1936
- 1934 ifl<>ltthenreturn
- 1936 forj=1torw:print#pf,left$(rw$(j),lp(lt)+lw-1):rw$(j)="":nextj
- 1937 fors=1tot%-rw:gosub2888:nexts:l=0:return
- 1938 rem-label size
- 1940 print"[147][158] label size [146]"
- 1941 print"[153] currently:[158]"rw"[153][157] rows,[158]"lw"[153][157] chrs,[158]"lt"[153][157] across [158]"
- 1942 printtab(3)"s[153][146]tandard - 5 rows, 34 chrs, 1 up"
- 1944 printtab(5)"15/16 inch by 3 1/2 inches"
- 1946 printtab(3)"l[153][146]arge - 8 rows, 34 chrs, 1 up"
- 1948 printtab(5)"1 7/16 inch by 3 1/2 inches"
- 1950 printtab(3)"c[153][146]hange label size and type"
- 1953 printtab(3)"e[153][146]xit"
- 1954 print" note: labels are separated by one row"
- 1956 printtab(7)"and 2 characters"
- 1958 gosub1521
- 1960 gosub1522:ifa$="e"then1584
- 1962 ifa$="s"thent%=6:rw=5:lw=34:goto1940
- 1964 ifa$="l"thent%=9:rw=8:lw=34:goto1940
- 1966 ifa$="c"then1968
- 1967 gosub602:goto1960
- 1968 print"[153] number of rows on label[158]?"rw
- 1969 print"[145]"tab(24);:inputrw:t%=rw+1
- 1970 print"[153] # of characters per row[158]?"lw
- 1971 print"[145]"tab(24);:inputlw
- 1972 print"[153] # labels across page [158]?"lt
- 1973 print"[145]"tab(24);:inputlt:iflt<1orlt>4thenprint"[145]":goto1973
- 1974 lp(1)=1:lp(2)=lw+2:lp(3)=2*(lw+2):lp(4)=3*(lw+2)
- 1975 goto1940
- 1976 rem-printer cmds
- 1978 print"[158][147] printer command [146]"
- 1980 print"[153] this routine will send character"
- 1982 print" string [chr$()] commands to an ascii"
- 1984 print" printer. commands must be entered in"
- 1986 print" the form of integers such as:"
- 1988 print"[158] ? 27[153] (code 1)"
- 1990 print"[158] ? 66[153] (code 2)"
- 1992 print"[158] ? 2[153] (code 3)"
- 1994 print"[158] ? *[153] (end)"
- 1996 print" this will be sent to the printer as:"
- 1998 print"[158] print#4,chr$(27)chr$(66)chr$(2)[153]"
- 2000 print" up to four(4) numbers may be sent,"
- 2002 print" the first normally being [158]27[146][153], the"
- 2004 print" escape character. end the sequence"
- 2006 print" by pressing return[153][146] when the asterisk"
- 2008 print" is showing. printers will vary, so"
- 2010 print" check your manual for the codes."
- 2012 print" any key[146][153] to continue or e[153][146]xit?"
- 2014 gosub1522:ifa$="e"then1584
- 2016 print"[158][147] send printer command [146]"
- 2018 print"[153] enter code, then press return[146][153]"
- 2020 print" return[153][146] only to quit[158]"
- 2022 fori=1to4:print"[153]code[158]";i;" ? * [157][157][157][157]";:inputi$(i)
- 2024 ifi$(i)="*"then2028
- 2026 nexti
- 2028 on(i-1)goto2030,2032,2034,2036:goto2039
- 2030 print#4,chr$(val(i$(1))):goto2038
- 2032 print#4,chr$(val(i$(1)))chr$(val(i$(2))):goto2038
- 2034 print#4,chr$(val(i$(1)))chr$(val(i$(2)))chr$(val(i$(3))):goto2038
- 2036 print#4,chr$(val(i$(1)))chr$(val(i$(2)))chr$(val(i$(3)))chr$(val(i$(4)))
- 2038 gosub2888
- 2039 printtab(10)"a[153][146]nother code"
- 2040 printtab(10)"t[153][146]est change"
- 2042 printtab(10)"e[153][146]xit to start"
- 2044 gosub1521
- 2046 gosub1522:ifa$="a"then2016
- 2048 ifa$="t"thenprint#4,"abcdefghijklmnopqrstuvwxyz":gosub2888:goto2046
- 2050 ifa$="e"thenreturn
- 2052 gosub602:goto2046
- 2854 rem-setup
- 2856 print"[158][147] printer or interface configure "
- 2857 ifp<>0thenprint"[153] current option is:[158]"p
- 2858 print" [153]press 1[153][146] cardco a, 1525"
- 2860 printtab(7)"2[153][146] printers w/ graphic interface"
- 2862 printtab(7)"3[153][146] 1526, mps801/802/803"
- 2863 printtab(7)"4[153][146] print to screen"
- 2864 ifp<>0thenprint" or s[153][146]end printer commands"
- 2866 ifp<>0thenprinttab(7)"e[153][146]xit to continue"
- 2868 gosub1521
- 2870 gosub1522
- 2872 ifa$="e"thenreturn
- 2874 ifa$="s"thengoto1978
- 2876 p=val(a$):pf=4
- 2878 ifp=1thenb1$=chr$(10):goto2856
- 2880 ifp=2thenb1$=chr$(0):goto2856
- 2882 ifp=3thenb1$=chr$(0):goto2856
- 2883 ifp=4thenb1$=chr$(0):pf=3:goto2856
- 2884 gosub602:goto2870
- 2886 rem-terminator
- 2888 onpgoto2890,2892,2894,2892
- 2890 print#pf,b1$;:return
- 2892 print#pf,b1$:return
- 2894 print#pf:return
- 2896 rem-jump to
- 2898 input"[147][153] start at record[158]? 1[157][157][157]";s:ifs>x or s<1then2898
- 2900 ifs=1thenreturn
- 2902 fori=1tos-1:print"[145] bypassing record #"str$(i)" of"str$(x)
- 2904 forn=1tof:input#5,rec$(n):nextn:gosub1618:ifet=8then1528
- 2906 nexti:return
- 2908 rem-report
- 2910 print"[153][147]report size[146] up to 136 character wide."
- 2912 print"modify printer for widths > 80 chrs."
- 2918 print"number of characters[158]?":print"? [157][157][157]";pw:input"[145]";pw
- 2920 ifpw>136then2918
- 2922 print"[147][153]title format[146] up to 4 title lines of"
- 2924 print"information at the top of the form."
- 2926 print"number of lines[158]?":print"? [157][157][157]";nl:input"[145]";nl:ifnl>4then2926
- 2927 ifnl=0thentt$(1)=">":goto2936
- 2928 forj=1tonl:print"[153]title #";j:print"[158]? > [157][157][157]";tt$(j)
- 2930 iflen(tt$(j))>37thenprint"[145]";
- 2932 input"[145]";tt$(j):iftt$(j)=""thentt$(j)=">"
- 2933 tt$(j)=left$(tt$(j),pw)
- 2934 nextj
- 2936 print"[147][153]column format[146] up to 16 columns with 2"
- 2937 print"spaces between columns"
- 2938 print"number of columns[158]?":print"? [157][157][157]";nc:input"[145]";nc:ifnc>16then2938
- 2940 forj=1tonc:print"[153]position of column #";j:print"[158]? [157][157][157]";pc(j)
- 2942 input"[145]";pc(j):nextj
- 2944 print"[147][153]heading format[146] column headings cannot"
- 2946 print"exceed width of columns:"
- 2948 forj=1tonc:print"[153]column[158]";j;"[153] heading[158]";
- 2950 ifj=ncthenprintpw-pc(j);:goto2954
- 2952 printpc(j+1)-2-pc(j);
- 2954 print"[153] characters wide"
- 2956 print"[158]? > [157][157][157]";hc$(j):input"[145]";hc$(j):ifhc$(j)=""thenhc$(j)=">"
- 2958 nextj
- 2960 print"[147][153]choose which fields go under the columns"
- 2962 print"[145]enter 0[153][146] if additional fields are":print"not desired."
- 2964 forn=1tof:print"";n;"[146][153] ";f$(n):nextn
- 2966 forj=1tonc:print"";tab(25)"[153]column[158]";j;""
- 2968 forl=1to3:printtab(25)"[145][153]field[158]";l;" 0 [157][157]";rp$(j,l)
- 2970 printtab(32);"[145]";:inputrp$(j,l):nextl:nextj
- 2972 print"[147][153]do you wish to sum the data in column[158]"str$(nc)"[153]?"
- 2974 print"this column must only be formatted with"
- 2976 print"only one field. enter 1[153][146] (yes) or 0[153][146] (n0)"
- 2978 print"[158]?";z:input"[145]";z
- 2980 print"[147][153]do you wish to review your format and/or"
- 2982 print"make corrections? press y[153][146] or n[158][146]"
- 2984 gosub1522
- 2986 ifa$="y"then2910
- 2988 ifa$="n"then2994
- 2990 goto2984
- 2992 rem-save report
- 2994 fl=2:print"[153] save report format[146]? y[153][146] or n[158][146]"
- 2996 gosub1522
- 2998 ifa$="n"then3118
- 3000 ifa$="y"then3004
- 3002 goto2996
- 3004 print"[153]save under what file name[158]?":ifrf$=d$orrf$=""thenrf$=nf$
- 3006 print" ";rf$:input"[145]";rf$:ifrf$=""then3118
- 3008 open15,8,15:print#15,"s0:rp] "+rf$:gosub1618:ifet=8then3118
- 3010 open5,8,5,"0:rp] "+rf$+",s,w":gosub1618:ifet=8then3118
- 3012 print#5,pw;cr$;nl;cr$;nc:gosub1618:ifet=8then3118
- 3014 forj=1tonl:iftt$(j)=""thentt$(j)=">"
- 3016 print#5,tt$(j):gosub1618:ifet=8then3118
- 3018 nextj
- 3020 fori=1tonc
- 3022 print#5,pc(i);cr$;hc$(i):gosub1618:ifet=8then3118
- 3024 forn=1to3
- 3026 print#5,rp$(i,n):gosub1618:ifet=8then3118
- 3028 nextn:nexti:print#5,str$(z);cr$;e$:gosub1618:ifet=8then3118
- 3030 close5:close15:goto3118
- 3032 rem-labels
- 3034 print"[158][147] label format "
- 3036 print"[153]this format uses 1 to 4 across labels.
- 3038 [153]"each label contains up tosys"t%[171]1"print rows.
- 3040 print"each row can consist of 1 to 3 fields.
- 3042 [153]"if the length of multiple items exceeds
- 3044 print"[157][158]"lw"[153]characters, some data will be cutoff"
- 3046 print"[153]number of rows[158]?":print"? [157][157][157]";rw:input"[145]";rw
- 3048 ifrw>t%-1thenprint"[145][145][145]":goto3046
- 3050 ifrw=0then3118
- 3052 print"[147][153]choose which fields go in each row"
- 3054 print"enter 0[153][146] if additional fields are":print"not desired."
- 3056 forn=1tof:print"";n;"[153][146] ";f$(n):nextn
- 3058 for j=1torw:print"";tab(25)"[153]row[158]";j;""
- 3060 forl=1to3:printtab(25)"[145][153]field[158]";l;" 0 [157][157]";ml$(j,l)
- 3062 printtab(32);"[145]";:inputml$(j,l)
- 3064 nextl
- 3066 nextj
- 3068 print"[147][153]do you wish to review your format and/or"
- 3070 print"make corrections? press y[146][153] or n[158][146]"
- 3072 gosub1522
- 3074 ifa$="y"then3034
- 3076 ifa$="n"then3082
- 3078 goto3072
- 3080 rem-save label
- 3082 fl=3:print"[153]save label format[146]? y[153][146] or n[158][146]"
- 3084 gosub1522
- 3086 ifa$="n"then3118
- 3088 ifa$="y"then3092
- 3090 goto3084
- 3092 print"[153]save under what file name[158]?":ifmf$=d$ormf$=""thenmf$=nf$
- 3094 print" ";mf$:input"[145]";mf$:ifmf$=""then3118
- 3096 open15,8,15:print#15,"s0:ml] "+mf$:gosub1618:ifet=8then3118
- 3098 open5,8,5,"0:ml] "+mf$+",s,w":gosub1618:ifet=8then3118
- 3100 print#5,rw
- 3102 fori=1torw:forn=1to3
- 3104 print#5,ml$(i,n):gosub1618:ifet=8then3118
- 3106 nextn:nexti
- 3110 print#5,"eof":gosub1618:ifet=8then3118
- 3112 close5:close15
- 3116 rem-print options
- 3118 print"[158][147] print options menu "
- 3119 print"[153] current record file: [158]"nf$
- 3120 print"[153] current format file: [158]";:ifk=2thenprintrf$;:goto3122
- 3121 ifk=3thenprintmf$;
- 3122 print:printtab(7)"l[153][146]oad old format"
- 3123 printtab(7)"c[153][146]reate/change format"
- 3124 printtab(7)"s[153][146]ave current format"
- 3125 printtab(7)"p[153][146]rint records"
- 3126 printtab(7)"$[153][146] disk directory 4[153][146]"
- 3128 printtab(7)"e[153][146]xit"
- 3130 gosub1521
- 3132 gosub1522
- 3134 ifa$="l"thenonkgoto3132,1668,1704
- 3136 ifa$="s"thenonkgoto3132,3004,3092
- 3138 ifa$="c"thenonkgoto3132,2910,3034
- 3140 ifa$="4"ora$="$"thengosub1628:goto3118
- 3141 ifa$="p"then1730
- 3142 ifa$="e"then1584
- 3144 gosub602:goto3132
- 3146 rem-right justify
- 3148 d=2:clm$=str$(int(val(clm$)*10^2+.5))
- 3150 ifleft$(clm$,1)=" "thenclm$=mid$(clm$,d)
- 3152 ifd>len(clm$)thenclm$=right$("00000000"+clm$,d)
- 3154 ifdthenclm$=left$(clm$,len(clm$)-d)+"."+right$(clm$,d)
- 3156 iflen(clm$)<cwthenclm$=right$(s$+clm$,cw)
- 3158 iflen(clm$)>cwthenclm$=left$(clm$,cw)
- 3160 print#pf,clm$;:return
-