/* Create an HTML table. 6/2011 */ create: procedure options (main); create_table: procedure (headings, table_contents); declare headings(*) character (10) varying; declare table_contents(*, *) fixed; declare (i, row, col) fixed; put skip edit ('') (a); /* Headings. */ put skip edit (' ') (a); /* For an empty column heading */ do i = 1 to hbound(headings); put edit (' ' ) (a); end; put edit ('') (a); /* Table contents. */ do row = 1 to hbound(table_contents, 1); /* row number */ put skip edit (' ') (a); /* row contents */ do col = 1 to hbound(table_contents, 2); put edit (' ' ) (a); end; put edit ('') (a); end; put skip edit ('
', headings(i), '
', row, '', table_contents(row, col), '
' ) (a); end create_table; declare headings (3) character (1) static initial ('X', 'Y', 'Z'); declare table_contents(3, 3) fixed static initial ( 4, -3, 8, 7, 2, -6, 11, 1, 15); call create_table (headings, table_contents); end create;