Databases Reference
In-Depth Information
Machine 1
Process A
Machine 2
Campos
Machine 3
Jones
Morales
Reed
FIGURE 10.14 Logical file structure creation.
Automated file saving eliminates these problems at the cost of some degree of flexibility to the
user. Recall that in Chapter 2 a date-time stamp generator was created that allowed the user to
generate any type of date-time stamp they wished.
The author has a personal preference when it comes to naming and saving reports. All filenames
should have a consistent date-time stamp embedded in them at some location in the filename. The
date-time stamp can then have a prefix, or a suffix, or both added to it. For example, the filename
might use a machine name for a prefix, and the operator's last name for suffix: MachineA_
20051117-153322_Bissett.xls. In this example, the date-time stamp is of the form YYYYMMDD
“-” HHMMSS (in military time format (24 h)).
The developer should go to even greater extremes to maintain a semblance of organization over
the files their macros generate. This would include utilizing the techniques covered in Chapter 2.
Whenever possible, a macro should create an “intelligent” directory structure to store its associated
data files. For example, suppose a user is running Process A, and Process A can be run using one
of three machines; Machine1, Machine2, or Machine3. It is also known that the process will only
be run by one of four technicians whose last names are Jones, Morales, Reed, and Campos. An
intelligent file structure to store analyzed data files for this process is shown in Figure 10.14.
Here, everything related to Process A is stored under a common directory, in this case “Process
A.” Under the Process A directory, are three additional directories named “Machine 1,” “Machine
2,” and “Machine 3,” each of which stores information acquired from each machine capable of
performing Process A. Within each machine directory resides a series of subdirectories that are
last names of all the possible operators for the machines that perform Process A: Campos, Jones,
Morales, and Reed.
What such a file structure does for the end user is that it allows files that contain certain
information to be segregated without the necessity of doing a query on the data. The directory
structure can be set up in any order that suits the user's application. In this instance, data is grouped
Search WWH ::




Custom Search