
CHAPTER 91 Exporting Records
Introduction
This chapter provides an overview of the techniques associated with exporting information out of IMSeries. IMSeries provides two types of export processes to help you exchange information between IMSeries databases (binary) and other applications and/or other IMSeries databases (text). Near the end of this chapter, is a discussion of how to use the export routines to synchronize multiple databases and to pre-determine the location and name of export files.
You can also import information into an IMSeries database in binary and text formats. The chapter "Importing Records" covers import procedures.
Text Exports
You will want to export information from IMSeries in text (or ASCII) form when you want to edit the exported data and/or when you want to import the exported data into another database or other computer application (e.g., word processor or spreadsheet).
When you want to export information that will be imported into another IMSeries database you could choose to export the data in either binary or text format. For information on exporting data in binary format, see "Binary Exports"
In order to export information in text format, you will use the Query Editor. By selecting the appropriate records and by creating templates that produce text that conforms to a required record structure, you can generate export files that enable you to send any data that IMSeries manages to any other system that allows you to import data in text (ASCII) form.
Before creating (or running) a query that produces a file that contains information you want to import into another application, make sure you are familiar with the import requirements of the other application. Your goal is to create a query that produces output that conforms to the needs of the system into which you will be importing the data.
Generally, this means that you need to know the record structure (i.e., the fields that are required, the sequence in which they need to be, and the character that serves as the delimiter (separator) between each field. You also need to know what character serves as the delimiter between each record. The following example will help illustrate how you can create a query to produce an export file that conforms to a given structure.
Example: Exporting Student Absences
This example assumes that the computer system into which the data will be eventually imported requires the following information for each absence: the student's ID, the section ID in which the absence occurred, the type of absence recorded, and the date on which the absence occurred. Furthermore, the example assumes that the field order as listed above matches the requirements of the receiving system.
To create the query use the following steps.
1. Open a query list view by either of the following methods.
2. IMSeries displays a new template for a query record and puts you in the add mode so you can create a new query. Complete the fields page of the query as illustrated in Figure 294.
FIGURE 294. Building a Query to Export Student Absence Records: Fields Page
![]()
3. Now, switch to the operations page of the query and create a folder sequence structure similar to the one depicted in Figure 295.
FIGURE 295. Query to Export Student Absence Records: Operations Page
![]()
4. Now build the operations for each folder in the process area.
5. Add the following operations for the student folder.
6. Add the following operation for the Section folder.
7. Add the following operations for the absence folder.
8. Now, switch to the template page. This is where you will instruct the query to produce the output you want in the format you want it.
9. Highlight the absence folder in the process area and drag a body template from the template list ('A' in Figure 296) into the template area ('B' in Figure 296).
FIGURE 296. Inserting a body template
10. When you drag the body template into the template area, IMSeries displays a blank body template and an accompanying fields tool. Use the fields tool to select fields that you want to include in the template. Figure 297 illustrates this.
FIGURE 297. Details for the body template for the Absence Folder
![]()
This field was inserted into the template first, because the computer application into which the data will be imported expects to read the student ID as the first field in the absence records in the import file.
Insert [Student]ID by choosing Student from the pop-up in the field tool. ('D' in Figure 297). IMSeries displays all the fields for the student records. When you double-click on ID, IMSeries inserts [Student]ID into the template where the insertion point is.
After inserting the [Student]ID, press [Tab] to insert a tab character. In the figure, the template preferences have been adjusted to show invisible characters.
To have IMSeries show invisible characters in document fields, choose Show Invisibles from the Edit Menu.
The tab serves as a field delimiter. It will tell the application into which the file will be imported, to stop reading the student ID and prepare to read the next field in the field sequence.
This is a return character. Insert it by pressing [Enter]PC or [Return]Mac. It serves as a record delimiter, and tells the application into which the data will be imported to stop reading one record and begin reading the next.
To insert a field into the template, choose the folder that manages the corresponding records from this pop-up. IMSeries will display the fields in the list below.
When you select a folder from the pop-up above, IMSeries displays all the fields associated with records managed by that folder. To insert a field into the template, simply double click it.
The names within the brackets '[" and ']' represent the folders, the names after the closing bracket ']' represent fields.
Choose the folders from the pop-up, and then double click on the field to insert it into the template.
11. Close the body template and save the query.
12. Try running the query. If it produces the output you want, edit it and, on the fields page, change the output from On Screen to Save to Disk.
13. Finally, to speed up the query, click the Partial (faster) radio button, so the query does not have to update the screen for each record it finds.
15. When the query is run, the user will be prompted for two dates. IMSeries will find all the absences in the database between those two dates and produce a file containing the student ID, the section ID, the absence type and the absence date for each absence.
16. When it has found all the records, it will prompt the user to specify a file name and location into which it will place the information.
17. You should be able to import the information in the file into another application.
Binary Exports
Whenever you want to exchange information between two different IMSeries databases, and you want to include contents of document fields in the exchanged information, you will need to use the binary export features in IMSeries. When you choose this option, IMSeries controls all the formatting and content, you merely indicate which records you want to include in the export file.
When someone imports the file, IMSeries reads the content and displays the information in the file so s/he can determine whether or not s/he wants to complete the import process.
This section describes how to create a binary export file. The documentation covers the process used to import binary files elsewhere, see "Binary Import"
If you want to create a binary export file for a single occasion, you would initiate the process by making the folder that manages the records you want to export, including the records you want to export in the folder, and then choosing Export from the File menu. If you want to export the same or similar data repeatedly, you will want to create a query in which you include the binary export specifications. That way, you do not have to recreate the specification each time you want to export data. You would just run the query and have the query produce the export file.
The next section describes how to specify which records to include in the binary export file regardless of which technique you use.
Example: Exporting Instructional History for a Student
Suppose you want to export all pertinent instructional information for a student who is transferring to another school in the district. You want the receiving school to be able to import (in their IMSeries database), the relevant demographic information on the student, as well as all of the lesson plans, assessments, and grades the student has received while s/he has been enrolled in your school.
To do this on a single-event basis, you would use the following steps.
1. Make the student folder active and find the record for the student for whom you are going to create the binary file.
2. Open a list view for the students and highlight the student's name.
To open a list view for a folder, choose List from the View Menu or from the folder level pop-up menu. Alternatively, you can press [Ctrl+L]PC or [Cmd+L]Mac.
3. Click Select to put that student's name, and only that student's name into the student folder and close the list view.
4. Choose Export from the File Menu. IMSeries displays a binary export file dialog box. A picture of the dialog box appears in Figure 301.
Notice that the Student folder is expanded in the figure. This is because the student folder was the active folder when the user chose Export from the File menu.
FIGURE 298. Standard Binary Export Dialog Box (Records Page)
![]()
5. Once you have marked all the records you want to include in the binary export file, click Export.
6. IMSeries will display a file locator dialog box. Use this box to provide a name and location for the file you will be creating.
Including Binary Export Specification in Queries
If you find that you will be exporting similar data on a regular basis, you probably do not want to go through the trouble of defining a new export specification each time you need to create a new binary export file. You can automate the creation of binary export files by including the export specifications into queries.
For example, it is possible that, throughout the year, several students might transfer from one school to another in your district. Instead of creating a new export specification each time a student transfers, you could write a query that prompts the user to identify which student s/he wants to export records for and have the query select and export the related records. The following text describes how you can do this.
1. Open a list view of queries by choosing Query from the Select Menu, or by pressing [Ctrl+G]PC or [Cmd+G]Mac.
2. Prepare to add a new query by choosing New from the Record Menu, or by pressing [Ctrl+N]PC or [Cmd+N]Mac.
3. In the appropriate fields on the fields page of the query record, enter a name for the query and give a detailed description of what it does.
FIGURE 299. Creating a Query to Create a Binary Export File: Fields Page
![]()
4. Next, switch to the operations page and include the student folder in the process area.
FIGURE 300. Creating a Query to Create a Binary Export FIle: Operations Page
![]()
Drag this folder from the list of folders ('B') into the process area to include it in the query.
IMSeries displays the list of folders that you can view with your account in this list. Drag a folder into the process area to include it in the query.
Drag the procedure operator into the operations area. IMSeries will display the procedure editor.
Use the procedure editor to add a function that requests the user to input a student ID. To do this, type
"Text1:=Request("Enter the ID for the student whose records will be exported";Text1)"
Drag the procedure operator again into the process area. In the procedure editor, type
"Query([student];[student]id = text1)"
This operation directs IMSeries to search the records in the student folder and return the record that has the value of text1 in the ID field.
Now that the query has found the student record you want to export, set up the export specification.
Drag the Export operator into the process area. IMSeries displays the binary export dialog box (see Figure 301 on page 834).
Complete it in the same way as you did in the See "Example: Exporting Instructional History for a Student"
When you have finished using the binary export dialog box to indicate which records related to the student you want the query to include in the export. click OK. IMSeries will embed the export specification in the query.
If you save the query, then you can run it anytime you want to create a binary export file for any student.
Export Dialog box in Queries
To create a query that you can use over and over to create binary export files of selected records, first direct the query to find the initial records you want to include in the binary export file. Then, drag the export operator into the operations area and indicate, in the binary export dialog box, any other records that you want to include in the export file. You can use the binary export dialog box to include any record in the export file. Using the initial records as a start, specify which other records you want IMSeries to include in the export by selecting records from related folders.
When you include the export operation in a query, the dialog box is slightly different than the one displayed when you export information 'manually'. Compare Figure 298 on page 827 with Figure 301 on page 834. Note that, when you insert the export operation in queries, the Export and Cancel buttons no longer are present. Instead, there are two check boxes "Show Interface and Status" (F in Figure 301) and "Wait for Export Completion" (G in Figure 301).
FIGURE 301. Binary Export Dialog Box in a Query
![]()
When you activate the "Show Interface and Status" check box, IMSeries will display the status of the import process as it occurs. If you activate the "Wait for Export Completion" check box, then IMSeries will wait until the export is completed before it executes any other operation.
Controlling destination of the Export
By making the Destination Page of the Export dialog box active, you can pre-specify where IMSeries will send the data that are exported during the export operation. There are two options. First, if you specify a file name and location (B in Figure 302), then IMSeries will place the exported information in the specified file and at the specified location. C in Figure 302 illustrates this.
FIGURE 302. Standard Binary Export Dialog Box (File as Destination)
![]()
First, make the Destination Page of the Export Dialog Box active by clicking on the Destination tab.If you activate the 'File' Radio button and click Set File, you can use the standard file locator dialog box to navigate to the location where you want IMSeries to store the information it exports during this specific export operation.
You will be asked to select a file or specify a file name. If the file already exists, you will be asked if you are sure you want the contents to be overwritten when the export process occurs.
If you specify a Direct database connection instead of the File option and specify the URL or IP address of the 'target' database, then IMSeries will export the data specified in the dialog box to that database during the export process. This is illustrated in Figure 303.
Automating Data I/O and Synchronization
If you add a wait operator to the query and run it as a background process, then IMSeries can synchronize multiple databases automatically depending on the settings in the Wait operation. For a more detailed discussion of the Wait operator, see "Wait"
FIGURE 303. Standard Binary Export Dialog Box (IMSeries Database as Destination)
![]()
The user name / password combination (C in Figure 303) are sent with the data to the target database. The account in the target database that corresponds to the user name / password sent with the data, controls whether or not the data can be added to that database. In other words, if the account does not allow new student records to be added, and if the export file contains student records, then the target database will refuse the update.
Learning Technology Systems, Inc. http://www.imseries.com Voice: (865) 560-0261 Fax: (865) 769-5604 sales@imseries.com |