I wrote my first class in InterSystems Caché. How can I run it?


Hi Ponnumani.

You cannot run class itself in Caché. You can run some classmethod of this class.

For example from terminal you can run classmethod 'PrintPersons' of class Sample.Person as follows:

USER>zn "samples"

SAMPLES>do ##class(Sample.Person).PrintPersons()

Name: Klein,Agnes E.
Name: Willeke,Imelda R.
Name: Vanzetti,Rhonda Y.

I encourage you to read "Caché Programming Orientation Guide".

Particularly it contains information on how you can use terminal to test your programs:

you can run like W ##Class(packagename.classname).classmethodname() (if it quits)