Date: Thu, 03 Feb 2005 18:55:58 -0600 (CST) From: Mark Jacobson To: 810-151-80@uni.edu Subject: Re: [810-151-80] output file Josh (and Visual Basic .NET 9 MWF students), Thanks for the question(s), The output file is HIDDEN and you cannot look at it or print it out directly. You need software to access it (the random file, not the original input file of 25 records). ------ The random access file is created by your program and has 11 buckets. Each bucket has an ability to store up to 5 different logical records representing a collection of facts about a fictional student. Each fact is a value in a field of the logical record. Besides the data itself, which is all the input file to your program has (25 logical records on 25 separate "lines" or raw ASCII text), your 11 buckets (11 record random access file), will have two extra fields for each and every one of the 11 buckets. The count field which will be set to 0 (zero) for every single record in the 11 record (11 buckets) random access file after it is first created, and the overflow field, which will be set to FALSE for every one of the 11 records after it is created... AFTER you create the file, you will close it. Then you will call another procedure that opens up this file, http://www.cns.uni.edu/~jacobson/030VB.NET/studentsFixedWidth.txt or ---------------------- http://www.cns.uni.edu/~jacobson/030VB.NET/studentsFixedWidth5.txt ----------------------- and opens up your initialized, 11 "bucket" random access file, and populates that random access file with the 25 records you read from the raw text, ASCII file you downloaded from the web site. When you finish doing that, most or all of the buckets will have count fields >= 1 in value, and probably one or two buckets will have overflow fields = TRUE. The file system (for the operating system - Windows or Linux or Unix) in conjuction with the VB .NET interface to it for random files (note the differences in the textbook for whether a file is comma separated values or fixed width and just raw text ASCII file, or if the file is RANDOM access. Totally different syntax, and that is related to totally different ways of organizing and accessing data on secondary storage media), is the key here. There are sequential access files, indexed files, and relative files are three different ways to arrange access to logical records. Which is "best"? Depends on what the situation is and the needs of the user are. This will be a very useful learning experience and foundation for the couple classes we have on Visual Basic .NET and database, I can tell! You have to write programs that would look at it and access the random file records and buckets and print out the records or the ID numbers, or all the fields. The output file is analogous to a PhotoShop or a Microsoft Word file, in that you have to have a program that understands the format of the information in the file and returns records in response to your query (like a database) or prints a report (detailing each and every record of the 25 records in the random file, or summarizing say the average gradepoint of all 25 students, or subsetting and selecting just certain records (say only the computer science or only the students who are sophomores and bioinformatics majors). There is no sample output to show you! This program is due on Monday, right? (I apparently gave away the last handout for it, or misplaced my extras or master copy). If this program is due on Monday, and I am remembering correctly, then lets have questions and discussion during the Friday class! Since I am the instructor for the class, let me say that the program is due on Monday, either as originally stated or as the new due date. ---------------- In which case, we have time for lots of questions and clarifications and several new example programs tommorrow morning in class. We will start the chapter on VB .NET database concepts, if time permits tommorrow, but the above discussion should indicate the Files chapter, and especially random files and relative files (hash table concepts to directly calculate the disk address of the record you are looking for), is a perfect foundation for the databases techniques and concepts. As long as you have 5 records per bucket, and 11 buckets, whatever format you choose for the HOW to implement storing 5 records per bucket and handling overflow problems is your choice. There are MANY ways (HOWs) to achieve the ONE goal (WHAT) that the specs require. ---- --- --- ---- Mark On Thu, 3 Feb 2005 miller06@uni.edu wrote: > hello class > after reading the email on the class website (from Professor Jacobson > to Bilbo Baggins) i realize i do not understand what the output file > should look like. i guess if someone could show me a sample output i > would have a better idea (i am looking for whether or not we > print/write the count variables and overflow tags... or if they are > only a part of some temporary data structure) > > all comments are appreciated, and feel free to reply to the class list > > thanks > > josh