Skip to content

DATA LIST

Defines variables and reads data typed into the syntax (with BEGIN DATA) or from a text file.

DATA LIST [FIXED|FREE|LIST] [("delimiters")] [FILE='path'] [RECORDS=n] [SKIP=n] [TABLE|NOTABLE]
/ var start-end [(A|decimals|FORMAT)] … (FIXED, column style)
/ var var (format list: 2F5.1, A3, nX, Tn) … (FIXED, format style)
/ var [(FORMAT)] … (FREE and LIST)
Kind Data management
Body free-form body
Changes data yes, undoable
DATA LIST FIXED /name 1-10 (A) age 12-13 score 15-18 (2).
BEGIN DATA
Alice 34 1234
END DATA.
DATA LIST LIST (",") /id (F3) name (A10) score.
BEGIN DATA
1,"Smith, J",3.5
END DATA.
DATA LIST FREE / x y (2F5.1) label (A8).
BEGIN DATA
1 2 first 3 4 second
END DATA.
DATA LIST FILE='measurements.txt' FIXED RECORDS=2 /1 id 1-4 /2 weight 1-5 (1).
  • FIXED (the default) reads columns; FREE reads values separated by blanks or commas, letting a case run across lines; LIST reads one case per line.
  • A format in parentheses applies to every variable named since the previous format, so id name (A6) makes both strings.
  • (2) after a column range means two implied decimals when the field has no decimal point.
  • A blank or ‘.’ field is system-missing. The data become a new active dataset (named data_list, or after the file).
  • Date and time formats (DATE, ADATE, EDATE, SDATE, DATETIME, TIME, …) are read into OrcStat date values.

BEGIN DATA, IMPORT DATA, LIST


Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.