Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #3159 > unrolled thread

database prgrams to keep track of things?

Started byLazarus Lukas <lazarusappleprogrammer@gmail.com>
First post2016-10-29 03:26 -0700
Last post2016-10-31 22:46 -0700
Articles 10 — 4 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 03:26 -0700
    Re: database prgrams to keep track of things? Steven Hirsch <snhirsch@gmail.com> - 2016-10-29 09:33 -0400
      Re: database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 11:18 -0700
      Re: database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 11:23 -0700
        Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-29 21:14 -0700
          Re: database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 22:36 -0700
            Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-30 09:02 -0700
              Re: database prgrams to keep track of things? roger.shimada@gmail.com - 2016-10-31 19:16 -0700
                Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-31 22:14 -0700
                Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-31 22:46 -0700

#3159 — database prgrams to keep track of things?

FromLazarus Lukas <lazarusappleprogrammer@gmail.com>
Date2016-10-29 03:26 -0700
Subjectdatabase prgrams to keep track of things?
Message-ID<0de24976-7c45-49f9-878c-947add8129b9@googlegroups.com>
any programs like this out there?

[toc] | [next] | [standalone]


#3160

FromSteven Hirsch <snhirsch@gmail.com>
Date2016-10-29 09:33 -0400
Message-ID<rZydnQEutu-POInFnZ2dnUU7-YvNnZ2d@giganews.com>
In reply to#3159
On 10/29/2016 06:26 AM, Lazarus Lukas wrote:
> any programs like this out there?

Take a look at DB Master?


[toc] | [prev] | [next] | [standalone]


#3161

FromLazarus Lukas <lazarusappleprogrammer@gmail.com>
Date2016-10-29 11:18 -0700
Message-ID<2deed4ad-ef30-47dd-904b-e0db544e9f99@googlegroups.com>
In reply to#3160
On Saturday, October 29, 2016 at 8:33:12 AM UTC-5, Steven Hirsch wrote:
> On 10/29/2016 06:26 AM, Lazarus Lukas wrote:
> > any programs like this out there?
> 
> Take a look at DB Master?



On Saturday, October 29, 2016 at 8:33:12 AM UTC-5, Steven Hirsch wrote:
> On 10/29/2016 06:26 AM, Lazarus Lukas wrote:
> > any programs like this out there?
> 
> Take a look at DB Master
thank you. I'll try and find db master 

[toc] | [prev] | [next] | [standalone]


#3162

FromLazarus Lukas <lazarusappleprogrammer@gmail.com>
Date2016-10-29 11:23 -0700
Message-ID<d98ea7e3-0894-43b6-a41e-e7b52a5e6e58@googlegroups.com>
In reply to#3160
On Saturday, October 29, 2016 at 8:33:12 AM UTC-5, Steven Hirsch wrote:
> On 10/29/2016 06:26 AM, Lazarus Lukas wrote:
> > any programs like this out there?
> 
> Take a look at DB Master?

can you answer this please? is their any applesoft basic disk for entering records, fines, searching records, or anything like that? need it for school project. 

[toc] | [prev] | [next] | [standalone]


#3163

Fromgids.rs@sasktel.net
Date2016-10-29 21:14 -0700
Message-ID<1c07d449-ad0f-4541-ab6a-2cb40098354d@googlegroups.com>
In reply to#3162
On Saturday, October 29, 2016 at 12:23:55 PM UTC-6, Lazarus Lukas wrote:
> On Saturday, October 29, 2016 at 8:33:12 AM UTC-5, Steven Hirsch wrote:
> > On 10/29/2016 06:26 AM, Lazarus Lukas wrote:
> > > any programs like this out there?
> > 
> > Take a look at DB Master?
> 
> can you answer this please? is their any applesoft basic disk for entering records, fines, searching records, or anything like that? need it for school project.



I have only seen a fairly complete applesoft database type-in program in a Nibble magazine.  You probably wont see a commercial product written in applesoft basic.

Appleworks has the three big programs, Spreadsheet, word processor and database, that were the most popular.

An applesoft database should be fairly easy to write.  I wrote a simple one for entering Names and addresses, but can easily be converted to anything else.  Minus the more complex routines for sorting and searching.

If you want to try it out, it is complete as far as reading and writing records to a text file.  It is fairly small, so I can post it here.

[toc] | [prev] | [next] | [standalone]


#3164

FromLazarus Lukas <lazarusappleprogrammer@gmail.com>
Date2016-10-29 22:36 -0700
Message-ID<af13b8af-0b84-4682-96e7-062099652212@googlegroups.com>
In reply to#3163
On Saturday, October 29, 2016 at 11:14:44 PM UTC-5, gid...@sasktel.net wrote:
> On Saturday, October 29, 2016 at 12:23:55 PM UTC-6, Lazarus Lukas wrote:
> > On Saturday, October 29, 2016 at 8:33:12 AM UTC-5, Steven Hirsch wrote:
> > > On 10/29/2016 06:26 AM, Lazarus Lukas wrote:
> > > > any programs like this out there?
> > > 
> > > Take a look at DB Master?
> > 
> > can you answer this please? is their any applesoft basic disk for entering records, fines, searching records, or anything like that? need it for school project.
> Hi, yes thank you I'd love to see it. please post it here. thank yo
> 
> 
> I have only seen a fairly complete applesoft database type-in program in a Nibble magazine.  You probably wont see a commercial product written in applesoft basic.
> 
> Appleworks has the three big programs, Spreadsheet, word processor and database, that were the most popular.
> 
> An applesoft database should be fairly easy to write.  I wrote a simple one for entering Names and addresses, but can easily be converted to anything else.  Minus the more complex routines for sorting and searching.
> 
> If you want to try it out, it is complete as far as reading and writing records to a text file.  It is fairly small, so I can post it here.for your time.

[toc] | [prev] | [next] | [standalone]


#3165

Fromgids.rs@sasktel.net
Date2016-10-30 09:02 -0700
Message-ID<6c29a240-6145-4175-8e84-35d5275c08c2@googlegroups.com>
In reply to#3164
On Saturday, October 29, 2016 at 11:36:38 PM UTC-6, Lazarus Lukas wrote:
> On Saturday, October 29, 2016 at 11:14:44 PM UTC-5, gid...@sasktel.net wrote:
> > On Saturday, October 29, 2016 at 12:23:55 PM UTC-6, Lazarus Lukas wrote:
> > > On Saturday, October 29, 2016 at 8:33:12 AM UTC-5, Steven Hirsch wrote:
> > > > On 10/29/2016 06:26 AM, Lazarus Lukas wrote:
> > > > > any programs like this out there?
> > > > 
> > > > Take a look at DB Master?
> > > 
> > > can you answer this please? is their any applesoft basic disk for entering records, fines, searching records, or anything like that? need it for school project.
> > Hi, yes thank you I'd love to see it. please post it here. thank yo
> > 
> > 
> > I have only seen a fairly complete applesoft database type-in program in a Nibble magazine.  You probably wont see a commercial product written in applesoft basic.
> > 
> > Appleworks has the three big programs, Spreadsheet, word processor and database, that were the most popular.
> > 
> > An applesoft database should be fairly easy to write.  I wrote a simple one for entering Names and addresses, but can easily be converted to anything else.  Minus the more complex routines for sorting and searching.
> > 
> > If you want to try it out, it is complete as far as reading and writing records to a text file.  It is fairly small, so I can post it here.for your time.



Use CTRL-S to save to a file.
Left arrow or Del key to back up one character or line
RTN to advance to next line
SPC bar to advance to next record after pressing RTN on last entry



 5  PRINT  CHR$ (21)
 10  READ LM: DIM X(120),AD$(100,LM)
 15 TB(0) = 2:TB(1) = 6:TB(2) = 25:TB(3) = 45:TB(4) = 55:TB(5) = 65
 20 P1 = 0:LR = 0: HOME : FOR J = 0 TO LM: READ A$(J),K(J): FOR I = 1 TO K(J):B$(J) = B$(J) + " ": NEXT :LR = LR + K(J): NEXT : FOR J = 0 TO LM: HTAB 12 -  LEN (A$(J)): PRINT A$(J)":";
 100  FOR I = 1 TO  LEN (B$(J)):CU =  PEEK (40) + 256 *  PEEK (41) +  PEEK (36): PRINT ".";:X(P1) = CU:P1 = P1 + 1: NEXT : PRINT : NEXT 
 200  POKE 51,128:P1 = 0
 210 Z =  PEEK (X(P1)): IF Z > 159 THEN Z = Z - 128
 220  IF Z = 45 THEN P1 = P1 + 1: GOTO 210
 240  POKE X(P1),Z
 250  WAIT  - 16384,128:Z =  PEEK ( - 16384): POKE  - 16368,0
 260  IF Z = 136 OR Z = 255 THEN  POKE X(P1),174:P1 = P1 - (P1 > 0) - ( PEEK (X(P1 - 1)) = 168) - ( PEEK (X(P1 - 1)) = 169): POKE X(P1),174: GOTO 210
 270  IF Z = 141 THEN  ON P1 < 1 GOTO 500: FOR I = 0 TO 1: POKE X(P1),160:TM = X(P1):P1 = P1 + 1:I = ((X(P1) - TM) <  > 1) + (P1 = LR): NEXT : ON P1 >  = LR GOTO 300: GOTO 210
 275  IF Z = 155 THEN  TEXT : HOME : PRINT "TYPE 'GOTO 200' TO CONTINUE WITH DATA   AND VARIABLES IN TACT": GOTO 998
 290  ON Z = 147 GOTO 500: ON Z < 160 GOTO 210: POKE X(P1),Z:P1 = P1 + 1: ON P1 < LR GOTO 210
 300 P1 = 0: FOR J = 0 TO LM: FOR I = 1 TO K(J):TM = X(P1):P1 = P1 + 1:AD$(A,J) = AD$(A,J) +  CHR$ ( PEEK (TM)): POKE TM,174: NEXT : NEXT 
 310 A = A + 1: GOTO 200
 500  PRINT : VTAB 21: INPUT "ENTER FILE NAME OR PRESS RTN-> ";A$
 502 IF A$<> "" THEN D$ =  CHR$ (4): PRINT D$"OPEN"A$: PRINT D$"WRITE"A$
 510  FOR I = 0 TO A - 1: FOR J = 0 TO LM: PRINT AD$(I,J): NEXT : PRINT : NEXT 
 512  PRINT D$"CLOSE"
 515  POKE 48688,240: POKE 48689,253
 520  FOR I = 0 TO A - 1: FOR J = 0 TO LM: PRINT AD$(I,J),: NEXT : PRINT : PRINT : NEXT 
 998  PRINT  CHR$ (18): TEXT : END 
 999  DATA 8,NUMBER,3,LAST NAME,12,FIRST NAME,10,STREET ADR,20,CITY,16,PROVINCE,2,POSTAL CODE,7,TELEPHONE,12,EMAIL,20

[toc] | [prev] | [next] | [standalone]


#3167

Fromroger.shimada@gmail.com
Date2016-10-31 19:16 -0700
Message-ID<bed3bac0-38ba-4cae-8aa2-2b16d55e9e65@googlegroups.com>
In reply to#3165
On Sunday, October 30, 2016 at 11:02:53 AM UTC-5, gid...@sasktel.net wrote:
>  290  ON Z = 147 GOTO 500: ON Z < 160 GOTO 210: POKE X(P1),Z:P1 = P1 + 1: ON P1 < LR GOTO 210

Nice ON GOTO abuse there. Hope I'll never have to use it!

Hope that Lazarus realizes that the program doesn't read the file it creates, which is the hard part in either Apple II BASIC.

[toc] | [prev] | [next] | [standalone]


#3168

Fromgids.rs@sasktel.net
Date2016-10-31 22:14 -0700
Message-ID<08dbf4ec-1503-46c8-9ddc-9f033b4f52cb@googlegroups.com>
In reply to#3167
On Monday, October 31, 2016 at 8:16:07 PM UTC-6, roger....@gmail.com wrote:
> On Sunday, October 30, 2016 at 11:02:53 AM UTC-5, gid...@sasktel.net wrote:
> >  290  ON Z = 147 GOTO 500: ON Z < 160 GOTO 210: POKE X(P1),Z:P1 = P1 + 1: ON P1 < LR GOTO 210
> 
> Nice ON GOTO abuse there. Hope I'll never have to use it!
> 
> Hope that Lazarus realizes that the program doesn't read the file it creates, which is the hard part in either Apple II BASIC.


Not really.  Reading a file is almost exactly the same as Writing except you change the command from WRITE to READ, and, PRINT to INPUT and set up a loop until a Read error occurs.  Variable "A" is used as a counter and ends with the total number of records when finished reading.  Like so,

 600 ONERR GOTO 612
 602 A$="filename": A=0: D$ =  CHR$ (4): PRINT D$"OPEN"A$: PRINT D$"READ"A$
 610  FOR I = 0 TO 1: A=A+1: FOR J = 0 TO LM: INPUT AD$(A,J): NEXT : I=0: NEXT
 612  PRINT D$"CLOSE"

The hard parts to program are: to insert, edit or sort records.

[toc] | [prev] | [next] | [standalone]


#3169

Fromgids.rs@sasktel.net
Date2016-10-31 22:46 -0700
Message-ID<8a3b1d07-79d2-4637-9e0c-28983d55ef28@googlegroups.com>
In reply to#3167
On Monday, October 31, 2016 at 8:16:07 PM UTC-6, roger wrote:
> On Sunday, October 30, 2016 at 11:02:53 AM UTC-5, rob wrote:
> >  290  ON Z = 147 GOTO 500: ON Z < 160 GOTO 210: POKE X(P1),Z:P1 = P1 + 1: ON P1 < LR GOTO 210
> 
> Nice ON GOTO abuse there. Hope I'll never have to use it!
> 


I didn't post this program to teach anyone applesoft programming skills.  I wrote this back in the 1990's when I was learning to understand random access text files for myself.

I never really mastered the Record and Field commands which would be used to edit individual records.

With the Record and Field commands, you are not limited to just available memory for storing records.  You can access a disk file up to the maximum size of a file of 16 Mb.


Another statement is needed for line# 612 for the reading subroutine.

 612 POKE 216,0: PRINT D$"CLOSE"

The POKE disables the ONERR so that when another error occurs elsewhere in the program, it wont be directed back to this line.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.apple2.programmer


csiph-web