December 7, 1978. Dear Fellow DATATRIEVER: Congratulations on becoming charter members of the DATATRIEVE Special Interest Group. Your name will be coded by the DECUS office so that you will receive copies of each DATATRIEVE Newsletter. If you are not a DECUS member, this is the last time you will hear from me. All future SIG information will be mailed by DECUS. It is easy to become a member: I have enclosed a copy of the application form. Be sure to indicate your wish to join the DATATRIEVE SIG. Please feel free to pass copies of this form onto other users. Since there is myth that DATATRIEVE is difficult to use with two or more files, I am using this letter to distribute an advance copy of the first newsletter article. I would appreciate comments before January 15, 1979. If you have newsletter items, send them to me or to the newsletter editor: Kathy Tamer Technology, Inc. 17511 El Camino Real Houston, TX 77058 Her phone number is: commercial (713) 483-3471, FTS 525-3471 I would also like for as many of you as possible to submit mini-papers for the Spring DECUS symposium Be sure to indicate on the form that your paper is for the DATATRIEVE SIG. Remember, mini-papers are due to DECUS before Christmas this year. See you in New Orleans, Chuck Watson DATATRIEVE SIG Chairman DECUS #ID 56686 Battelle, Pacific Northwest Laboratory Box 999 Richland, WA 99352 Phone number: commercial (509) 942-3411, FTS 444-3251. DTR NEWS Using Two Files: It is quite easy to use two files in DATATRIEVE. The easiest way to illustrate this is with the YACHTS file and another file - OWNERS. Since the OWNERS file was not distributed with DATATRIEVE, you must create it as follows: DOMAIN OWNERS USING OWNER-REC ON OWNER.DAT; RECORD OWNER-REC 01 OWNER. 03 TYPE. 06 BUILDER PIC X(10). 06 MODEL PIC X910). 03 NAME PIC X(10). Populate the file as follows: BUILDER MODEL NAME ALBERG 35 SHERM ALBIN VEGA STEVE ISLANDER BAHAMA JIM ISLANDER BAHAMA ANN ISLANDER BAHAMA STEVE PEARSON 26 DICK This gives us an example of one model with 3 owners (either a co-op or three separate yachts) and one owner with two yachts (obviously STEVE has too much excess capital!). Now we have two files which we can use for testing the following and future suggestions. Hang onto YACHTS and OWNERS, they will be used in all future Newsletter Question and Answer articles. If you have questions, frame them in terms of these files. When you read an answer, you can test it using these files. WHICH YACHTS ARE OWNED? The following query will print a list of those YACHTS which have entries in the OWNERS file: DTR> FOR OWNERS PRINT YACHTS WITH TYPE = OWNER.TYPE LENGTH OVER MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE ALBIN VEGA SLOOP 27 5,070 08 $13,600 ISLANDER BAHAMA SLOOP 24 4,200 08 $6,500 ISLANDER BAHAMA SLOOP 24 4,200 08 $6,500 ISLANDER BAHAMA SLOOP 24 4,200 08 $6,500 PEARSON 26 SLOOP 26 5,400 08 Note: This gives 5 lines, one per owned YACHT. WHO OWNS WHICH YACHT? This requires a similar type of intersection between the two files. We need to print the names of the owners as well as the description of the YACHT. FOR OWNERS FOR YACHTS IF OWNER.TYPE = BOAT.TYPE PRINT OWNER.NATME.BOAT NAME MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE STEVE ALBIN VEGA SLOOP 27 5,070 08 $18,600 JIM ISLANDER BAHAMA SLOOP 24 4,200 08 6,500 ANN ISLANDER BAHAMA SLOOP 24 4,200 08 6,500 STEVE ISLANDER BAHAMA SLOOP 24 4,200 08 6,500 DICK PEARSON 26 SLOOP 26 5,400 08 Note: This still gives one line per owner. MAKING A COLLECTION OF OWNED YACHTS. It is often useful to make a collection from one file based on attributes in another. One might expect the following to work: DTR> FOR OWNERS FIND ALL YACHTS WITH TYPE = OWNER.TYPE [0 records found] [1 Record found] [1 Record found] [1 Record found] [1 record found] [1 Record found] DTR> SHOW COLLECTIONS Collections; CURRENT DTR> SHOW CURRENT Collection CURRENT Domain: YACHTS Number of records: 1 No selected record DTR> PRINT ALL OF CURRENT LENGTH OVER MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE PEARSON 26 SLOOP 26 5,400 08 Obviously the FOR LOOP approach will not work. SOLUTION: Version 1.1 supports an undocumented method for doing this which depends on the word ANY> DTR> FIND YACHTS WITH ANY OWNERS WITH TYPE = BOAT.TYPE [3 records found] DTR> SHOW CURRENT Collection CURRENT Domain: YACHTS Number of records: 3 No selected record DTR> PRINT ALL OF CURRENT LENGTH OVER MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE ALBIN VEGA SLOOP 27 5,070 08 $18,600 ISLANDER BAHAMA SLOOP 24 4,200 08 6,500 PEARSON 26 SLOOP 26 5,400 08 USING THE COLLECTION OF OWNED YACHTS. Here is a simple report of owned yachts and their owners. It depends on the previous FIND. DTR> PRINT ALL BOAT, ALL NAME OF OWNERS WITH TYPE = BOAT.TYPE LENGTH OVER MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE NAME ALBIN VEGA SLOOP 27 5,070 08 $18,600 STEVE ISLANDER BAHAMA SLOOP 24 4,200 08 6,500 JIM ANN STEVE PEARSON 26 SLOOP 26 5,400 08 DICK Note: This is equivalent to DTR> FOR CURRENT PRINT BOAT, ALL NAME OF OWNERS WITH TYPE = BOAT.TYPE CONCLUSION We now have two files YACHTS and OWNERS on our systems. I have shown several ways of using them in DATATRIEVE. Please try my examples and let me know of problems or other interesting constructs before the Newsletter deadline of January 15, 1979.