List. DORIC 9.65, INFO-Text software
विज्ञापन
विज्ञापन
LIST
LI
ST syntax cont’d
[beg_rec_1,end_rec_1] ]& beg_rec_2...]
DF_item
[
,
...] system_item system_variable string
#
T
#
X
*TAB
[#]
*X
[#]
*L
[#]
*W
[#]
*E
JECT
*A
row,column
*C
#
*CONT
EXT
*T
EXT syntax cont’d
[
P
RINT
FORMAT
(
FMT
)]
NOLINE
CONT
EXT
TEXT
] [
,
...]
or
LI
ST
AT
row
,
column [DF_item system_item system_variable [
,
...]
string
#
X
#
T
] [,...]
or
LI
ST
=[PRIN
T
]
displays or prints, using optional formatting specifiers, a combination of data file items from the selected set of records, system items, system variables, or strings. An unqualified LIST command displays all item values for all selected records.
INFO Reference Manual Commands 331
LIST arguments
[beg_rec_1,end_rec_1 & beg_rec_2...] you can list ranges of records by specifying the beginning and ending record numbers.
beg_rec_#
and
end_rec_#
must be numeric literals
.
DF_item
an INFO data file item.
system_item an INFO system item.
system_variable an INFO system variable.
string a character string enclosed with single quotes.
*TAB# or #T specifies the position for the next list item where n is the number of the column (1-200). An unqualified *TAB positions the next list item seven spaces to the right of the current column. If you use #T, you must include the tab value. The examples below list the LAST-
NAME from records 1-3 and records 9-12 starting in column 25.
ENTER COMMAND LIST 1,3&9,12 *TAB25,LAST-NAME
or
ENTER COMMAND LIST 1,3&9,12 25T,LAST-NAME
*X# or #X
specifies the spaces to insert before the next list item where n is the number of spaces (1-200). An unqualified *X inserts five spaces. If you use nX, you must include the space count value. The examples below list the LAST-NAME, 15 spaces, and then the DEPT for every record selected.
332 Commands INFO Reference Manual
LIST
ENTER COMMAND >LIST LAST-NAME,*X15,DEPT
or
ENTER COMMAND >LIST LAST-NAME,15X,DEPT
*L# inserts the number of line feeds specified by n. The line count defaults to 1. To double-space, specify *L2.
The following example lists the LAST-NAME from the first
10 records using triple spacing:
ENTER COMMAND >LIST 1,10 *L3,LAST-NAME
*W# specifies the list width for the next list item. If the item is a character item and the n specified is less than the item's defined output width, INFO truncates the item value to the specified number of characters. If the item is numeric and the n is less than the item's defined output width, INFO displays blanks for the item. The following example lists the LAST-NAME from the first 10 records, using one character as the list width. As a result, only the first character of each name appears in a column.
ENTER COMMAND >LIST 1,10 *W1,LAST-NAME
*EJECT clears the screen before the next list item. If you include the PRINT option, *EJECT performs a page eject before the next list item is printed. The example below clears the screen and then lists the LAST-NAME value for the first 5 records.
ENTER COMMAND >LIST 1,5 *E,LAST-NAME
*Arow,column takes the number of the row specified and lists the next list item that many rows below the last row listed and in the specified column. Assuming a previous
INFO command left the screen cursor on row 10, the example below displays LAST-NAME from the first selected record at row 15, column 10 and LAST-NAME from the second selected record at row 20, column 10.
INFO Reference Manual Commands 333
LIST
ENTER COMMAND >LIST 1,2 *A5,10,LAST-NAME
*C# lists a C-type data file item in a column where # specifies the width of the column. If # is less than the defined output width for the item, INFO truncates the item to n characters and wraps the remaining characters in the item to the next line of the same column. Each line of the column conforms to the # width specification. The example below lists the first three characters of LAST-
NAME on one line, lists the next three characters on the next line directly below the first three characters, and so on, until the number of characters defined in the output width is used up.
ENTER COMMAND >LIST *C3,LAST-NAME
INFO-Text only
INFO-Text only
INFO-Text only
INFO-Text only
*CONTEXT displays the specified X- or A-item in context, by including with the search text the two lines before and the two lines after the search text.
CONTEXT displays all X- or A-items referenced in the command line in context, by including with the search text the two lines before and the two lines after the search text.
*TEXT displays the text portion of the specified X- or Aitem.
TEXT displays the text portion of all X- or A-items referenced in the command line.
[,...] any of the previous options may be specified, each preceded by a comma, for a total of 16 specifications.
= the equal sign used as the last specification prevents
INFO from issuing a <RETURN> after data from each record is listed. Instead, INFO lists data from the next selected record on the same line, wrapping only at the end of the screen (or page) width. Subsequent LIST commands always reset this effect. It is used most often to save space when displaying one or two items.
334 Commands INFO Reference Manual
notes
LIST
The = (equal sign) used as the first list specification clears the screen. If this is followed by the PRINT option, a page eject symbol is placed in your spool file.
PRINT sends your listing to your spool file.
NOLINE operates like the equal sign (=) when the equal sign is used as the last list term. This NOLINE effect does not carry over to subsequent LIST commands.
FORMAT (FMT) suppresses data file item, system item and system variable name headings.
AT lists the requested information at the specified row and column on the screen.
row,column row can be a value from 0 to 24. A value of
0 clears the screen. A value of 1 corresponds to the first usable line on the screen and a value of 24 to the last usable line. A value of 24 may cause the screen display to scroll. Column can be a value from 1 to the maximum screen width of your terminal.
n
An unqualified LIST command displays all item values for all selected records, with each record starting on a new line.
n
When listing a range of records, you can separate the beginning record number and end record number with either a comma (,) or a dash (-).
n
There cannot be more than 16 specifications (including format specifiers) per LIST command. The more formatting specifiers you use or the longer the literal specified in the LIST command line, the fewer list terms can be specified with the LIST command.
n
When the combined width of the listed items is less than one line, INFO lists the values for each item in a column, headed by the item name. If the LIST command is executed in an even-numbered program section, no item names appear over the columns. INFO generates a first column which lists the record number for the record on each line under the column heading $RECNO.
INFO Reference Manual Commands 335
LIST discussion
n
When the total width of the listed items is wider than one line, record items are listed vertically, one item per line, with the item name preceding each item value.
INFO lists the item names and values for each selected record in order as the items are defined for the record, for an unqualified LIST command, or as the items are specified. INFO lists the items either in columns or serially, depending upon the total length of the items.
You can include specifications to control the format of the listing, such as tabbing, spacing and column positioning, as described in the syntax description above.
You can suppress the display of item names by including the FORMAT option items or system variables.
The width of the line is dependent on the hardware you are using. The default limits are 80 spaces wide for a screen and 132 spaces wide for a printed line.
When using LIST without the PRINT option, the output of values whose output width exceeds 80 characters is truncated. When using LIST with the PRINT option, the output of values whose output width exceeds the value of the system item $PRINTER-SIZE is truncated. There is no wrapping.
When listing over 23 lines of information, INFO displays
23 lines of data (one screenfull) followed by the prompt
MORE?. Respond as follows:
Response
<RETURN>
Y
Description
Continues listing the records in 23-line increments, beginning with the line after the last line listed on the previous screen, prompting MORE? each time.
Lists remaining records in a continuous display, without stopping after each 23 lines, and returns to ENTER COMMAND> when the last record has been displayed.
336 Commands INFO Reference Manual
N
C examples
LIST
Ends the display and returns to command level.
Ends the display of the current record and begins displaying the next record, in contrast to
<RETURN>, which continues the display with the current record.
List data in the selected records in columns (total width of listed items is less than one line):
ENTER COMMAND >SELECT DF.TYPE
8 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO
1
2
3
4
5
6
7
8
YEAR INDUSTRY
1976 100
1977
1978
1979
1980
1981
1982
1983
250
250
275
300
250
325
0
CONDO
0
25
50
60
100
70
90
100
Lists all the item values for all selected records.
HOUSE
50
75
100
150
150
100
125
150
Vertical list (total width of listed items is wider than one line):
ENTER COMMAND >SELECT DF.CUSTOMER
10 RECORD(S) SELECTED
ENTER COMMAND >LIST 1
CUST-NUM
FIRST-NAME
LAST-NAME
STREET
CITY
STATE
ZIP
Lists the item values for record number 1
=134
=HOLLY
=HARWOOD
=21 HILLVIEW ST.
=HAVERHILL
=PA
=17812
INFO Reference Manual Commands 337
LIST
The following is an example of a datafile containing A-type items being listed (INFO-Text only).
ENTER COMMAND >SELECT—AND—UPDATE—EXAMPLE
ENTER SYNONYM FILE NAME ><R>
2 RECORD(S) SELECTED
ENTER COMMAND >LIST TEXT
l
NAMABLE-A =A.FIL.
This is the contents of the file called A.FIL.
NOT-NAMABLE-A =A00000302
This is the contents of a system-named text file.
2
NAMABLE-A =B.FIL
This is the contents of the second text file named by the user.
NOT-NAMABLE-A =A00000402
This is the second text file named by INFO-Text.
338 Commands INFO Reference Manual
डाउनलोड
विज्ञापन