The following linePrint* and table* functions simplify data formatting:
The linePrintBegin function creates a table into which line-by-line output will be written. This is useful when displaying 3270-style fixed width command output.
linePrintBegin([format])
linePrintBegin("FULLWIDTH");
The linePrint function writes a line of text into a line-by-line output table previously established by the linePrintBegin() function.
linePrint(text [,format])
linePrint("N13511 19 USERS LOGGED ON",MSGID);
The linePrintEnd function closes the line-by-line output table created by linePrintBegin( ).
linePrintEnd()
None.
linePrintEnd();
The tableBegin function creates the containing table structure and must be the first table statement issued.
tableBegin([title])
tableBegin("User list");
The tableAlign function sets the column alignment for each column in a table and must be issued before a tableHeading or tableRow statement. The value must be either left, center, or right, and defaults to left. All values are positional.
tableAlign(["left"|"center"|"right"|""][,…])
Each parameter represents a table column and must contain one of the following values: left, center, right, or empty string.
tableAlign("","","right");
The tableWrap function sets the column wrapping for each column in a table and must be issued before a tableHeading or tableRow statement. The value must be either wrap, nowrap, or empty string, which defaults to wrap. All values are positional.
tableWrap(["wrap"|"nowrap"|""][,…])
Each parameter represents a table column and must contain one of the following values: wrap, nowrap, or empty string.
tableWrap("","nowrap");
The tableSorted function sets the sorted indicator in a column heading indicating whether the column is sorted in ascending or descending order. The function must be issued before a tableHeading or tableRow statement. The value must be either A (ascending), D (descending), or empty string not sorted. All values are positional.
tableSorted(["A"|"D"|""][,…])
Each parameter represents a table column and must contain one of the following values: A, D, or empty string.
tableSorted ("","A");
The tableUrl function defines URLs for sort functions. If a column has a sort function URL, then the column heading has a button-like appearance and is a link. All values are positional.
tableUrl(url[,…])
Each parameter represents a table column and must contain a valid URL for a JavaScript sort function, or empty string.
tableUrl("sort('name')","sort('date')");
The tableHeading function sets the headings for each column of a table and must be issued before a tableRow statement. The value must be a string. All values are positional. To set the column headings for a 3-column table to tic, tac, and toe, code tableHeading("tic","tac","toe").
tableHeading([string][,…])
Each parameter represents a table column and must contain a string value.
tableHeading("Date","Time","User","Message");
The tableHeadingComplex function sets the headings for each column of a table and must be issued before a tableRow statement. It allows you to specify how many columns a table heading will span. The value must be a string. All values are positional.
tableHeadingComplex([string, colspan][,…])
Each parameter pair represents a table column heading and the number of columns it will span. The column heading is a string value and the column span value is numeric.
tableHeadingComplex("Date",1,"Time",1,"Values",3);
tableHeadingComplex("1st",1,"2nd",1,"3rd",1);
The tableRow function sets the data for each column. The values provided must be strings and all values are optional and positional.
tableRow([string][,…])
Each parameter represents a table column and must contain a string value.
tableRow("19-Mar-2003","12:34:09","usr1","Hello world");
The tableRowSpan function sets the data for each column and allows the data to span multiple columns. The values provided must be string-number pairs and all values are optional and positional.
tableRowSpan([string, colspan][,…])
Each parameter pair represents a table column and must contain a string value followed by a numeric.
tableRowSpan("19-Mar-2003",1,"12:34:09",1,"usr1",1,"Hello world",4);
The tableEnd function closes the containing table structure and must be the last table statement issued. There are no parameters.
tableEnd()
None.
tableEnd();