Creating a Data Table

There are three ways to create a data table.

Creating a data table in an IMLPlus program

Within an IMLPlus program you can use the statement DataTable.Create to create a new data table. For example

m = { 1 2 3, 2 4 6, 3 6 9, 4 8 12 };
DataTable.Create( "My Data", m );
/* another approach: create from a DataObject */
declare DataObject dobj;
dobj = DataObject.Create( "My Data 2", {"x" "y" "z"}, m );
DataTable.Create( dobj );

For more information on creating a data tables in IMLPlus programs, see Class DataTable.

Opening an existing SAS data set file
  1. On the File menu, point to Open, and then click File.
  2. Navigate to the directory containing the data set you want to open. Select the data set you want to open (or type the name of the data set).
  3. Click Open.

IML Studio maintains a list of recently opened data sets. If you previously opened a data set in a recent IML Studio session, you can quickly reopen that data:

On the File menu, point to Recent Data Sets, and then click the name of the data set you want to open.

Creating a new, empty data table
  1. On the File menu, point to New, and then click Data Set. IML Studio will display the New Data Set dialog box.
  2. In the Name box, type the name of the first variable.
  3. In the Type box, select the type of the first variable.
  4. Click OK.
  5. On the Edit menu, point to Variables, and then click New Variable. IML Studio will display the New Variable dialog box.
  6. In the Name box, type the name of the next variable.
  7. In the Type box, select the type of the next variable.
  8. Click OK.
  9. Repeat steps 5 through 8 for as many variables as you need.

Now type in your data. You can use the TAB, ENTER, and arrow keys to move from one cell to the next.  You can create a new observation by typing in the row marked with an asterisk.