Skip to main content

Exercises

  1. If you have not yet done so, use MVIMPORT to import the sample Universe account into Caché. The backup file is <cachesys>\Dev\tutorials\mv.

  2. Open the Caché MultiValue shell and execute multivalue queries that return the following information:

    1. The NAME, AGE, and HAIR for all records with a HAIR value not equal to “BRUNETTE” and AGE value greater than 35.

    2. The NAME and all PHONE values for all records that contain a PHONE subvalue that begins with “222” (that is, has a phone number with a “222” area code).

    3. The same as 2 except that only the PHONE values that start with “222” are returned.

    4. The number of records with NAME values that start with “SMITH” (that is, the last name is SMITH).

  3. Use Studio to create an MVBasic routine in MyAccount. Then execute the routine in the Caché MultiValue shell. The routine should meet the following requirements:

    • It reads through all of the IDs in MVFILE.PERSON.

    • Using MVBasic object syntax, it displays all of the data for each record in MVFILE.PERSON.

  4. Use Studio to create an MVBasic routine in MyAccount. Then execute the routine in the Caché MultiValue shell. The routine should meet the following requirements:

    • It reads through all of the IDs in MVFILE.PERSON.

    • Using MVBasic global access, it displays all of the data for each record in MVFILE.PERSON.

Note:

The solutions for the exercises are in <cachesys>\Dev\tutorial\mv\GettingStarted_soln.xml. Import this file into Caché using Studio. The solutions for Exercise 2 are comments in the source file for DISPLAY.PERSON.GLOB. For instructions on using Studio to import a file, see see Importing a File Using Studio.

FeedbackOpens in a new tab