Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
LIST—write lines to the list data set z/OS ISPF Services Guide SC19-3626-00 |
|
The LIST service allows a dialog to write data lines directly (without using print commands or utilities) to the ISPF list data set. You specify the name of the dialog variable containing the data to be written on the LIST service request. The amount of data that can be written with one LIST request is one or more lines totaling up to 32 767 bytes, the maximum size of the dialog variable. The list data set, if allocated, is normally processed when you exit ISPF. A LIST command is available to allow you to process the list data set without exiting ISPF. Command invocation formatCall invocation format>>-CALL--ISPEXEC--(buf-len,--buffer);-------------------------->< or >>-CALL--ISPLINK--('LISTbbbb'--,--dialog-variable-name,---------> .-'SINGLEbb'-. >--line-length--,-+-'PAGEbbbb'-+--,-+-'b'--------+--------------> '-'b'--------' +-'DOUBLEbb'-+ '-'TRIPLEbb'-' >--,-+-'OVERSTRK'-+--,-+-'NObbbbbb'-+-);----------------------->< '-'b'--------' '-'b'--------' Parameters
Return codesThese return codes are possible:
Formatting data to be written to the list data setISPF writes data to the list data set exactly as received in the dialog variable, which acts as the data buffer. The dialog must provide any data formatting or centering before passing the data to ISPF. The length of each data line passed to ISPF is the value of the line-length parameter specified on the LIST service request. If the line-length value is greater than or equal to the length of the passed data, ISPF writes the data as a single line in the list data set. If the line-length value is less than the length of the passed data, ISPF writes the data in multiple lines. If the line-length value specified is zero and CC is not specified, ISPF writes one blank line to the list data set. If CC is specified, the line length specified must be at least one (to accommodate the carriage control character); otherwise, a severe error results. List data set characteristics affect the LIST serviceThe dialog user can specify the logical record length (LRECL) and maximum line length values for the list data set by using SETTINGS option 0. ISPF uses these two values in determining where truncation of lines written to the list data set is to occur. The value in system variable ZLSTTRUN defines where ISPF is to truncate lines written to the list data set. This value is not directly alterable by the dialog. The value in ZLSTTRUN is the lesser of:
Controlling line spacing, page eject, and highlightingLine spacing and page ejects can be under control of either the dialog or ISPF. If the dialog specifies CC on the LIST service request, the dialog controls all carriage functions, using the first byte of each line passed to ISPF as a carriage-control character. Therefore, when CC is specified on the LIST service request, ISPF ignores any SINGLE, DOUBLE, TRIPLE, PAGE, and OVERSTRK keywords. ISPF causes an automatic page eject (regardless of CC keyword status) for a LIST service request that causes information to be written to a list data set for the first time in the session. How ISPF controls printer functions (CC not specified)When the dialog does not specify CC on the LIST service request, ISPF appends a carriage control byte ahead of each line to be written to the list data set. The dialog can include the SINGLE, DOUBLE, or TRIPLE keyword on the LIST service request to tell ISPF how lines are to be spaced when written to the list data set. Single spacing is the default value. The dialog can also specify, along with the line spacing keyword, the OVERSTRK keyword on the LIST service to cause highlighting. The optional PAGE keyword on the LIST request tells ISPF that the
first line written by this request is to include a page eject control
character. Thereafter, page ejects are caused by:
How the dialog controls printer functions (CC specified)When the dialog specifies CC on the LIST service request, ISPF ignores any other printer control keywords. ISPF then relies on the dialog to supply the printer control information as the first byte of each line in the data buffer to be written. ISPF does not check the validity of the characters included for carriage control. Using system variables ZLSTNUML and ZLSTLPP
Dialogs that provide carriage control characters can test variables ZLSTNUML and ZLSTLPP for values to determine when printing should begin on a new page. The ANSI-defined carriage control characters in the chart shown are recognized by the LIST service for updating (incrementing the number of page line spaces used) the value of ZLSTNUML. If the dialog passes any other carriage control character along with the CC keyword, the character is written to the list data set, but does not affect the value of ZLSTNUML. The carriage control characters, whether supplied to ISPF with
each line to be printed or supplied by ISPF, cause the actions listed
in the chart shown:
How carriage control characters affect truncationISPF counts only data characters, not the carriage-control character, in calculating the point at which truncation is to occur. A dialog can determine what the truncation value is by querying system variable ZLSTTRUN in the shared variable pool. The carriage-control byte must be taken into account when calculating
where truncation will occur. For example, assume that the truncation
value in ZLSTTRUN is 79, indicating that a maximum of 79 characters
per list data set line, not including carriage-control, are allowed.
Also, assume the dialog passes a line of 80 characters to be written
to the list data set. Truncation is as follows:
ExamplesExample 1Using three LIST service requests, write three lines, containing the text 'Line 1', 'Line 2', and 'Line 3' respectively, to the list data set. The text is to start at the top of a new page, and be double spaced. In preparation:
or alternately Set variable LEN to 6 and issue:
Example 2Write the same three lines as in Example 1, but with one LIST service request. In preparation, set dialog variable LSTTEXT to the value:
Then
issue:
or alternately Set variable LEN to 6 and issue:
Example 3Write the same three lines as in the previous examples, but with the carriage control characters being passed to ISPF. In preparation, set dialog variable LSTTEXT to the value:
The
characters '1' and '0' preceding the word 'Line' in LSTTEXT are carriage
control characters for page eject and double space respectively.Then issue:
or alternately Set variable LEN to 7 and issue:
Note
that the line-length value has been increased by one to account for
the carriage control byte.Example 4Print the same three lines as in Example 3. This time, assume that
ZLSTTRUN has a value of 5. In preparation, set up conditions to cause
the value of ZLSTTRUN to be 5. This value is the lesser of:
|
Copyright IBM Corporation 1990, 2014
|