Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).

Exercise 1: First Data Entry Routine

  1. Start Studio, and create a new routine, in the SAMPLES namespace.

  2. Enter the following ObjectScript:

    mydatent ; first data entry routine
        read !, "Name: " , name
        if name="" {quit  }  ; user entered nothing
        read !, "Phone: ", phone
        read !, "DOB: ", dob
        write !!
    display ; display the data
        write !, "Name:", ?20, name
        write !, "Phone:", ?20, phone
        write !, "DOB:", ?20, dob
    Copy code to clipboard
  3. Click File –> Save.

  4. Specify mydatent as the filename, and “Macro Routine” in the Files of type field. Click Save As. Then, click Build –> Compile to compile your routine.

  5. Start the Terminal, and run your routine, in the SAMPLES namespace, by typing do ^mydatent.

FeedbackOpens in a new window