A fix is available
APAR status
Closed as program error.
Error description
Documentation in the Enterprise PL/I Programming Guide is unclear with regards to I/O behavior when SYSIN is set to STDIN and coming from the terminal/console.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: Enterprise PL/I users who use record I/O * * (READ) to read SYSIN via STDIN from the * * terminal. * * * **************************************************************** * PROBLEM DESCRIPTION: Documentation in the PL/I manuals is * * unclear when it comes to reading SYSIN * * from STDIN via the terminal under the * * USS environment. * * * **************************************************************** * RECOMMENDATION: Apply the PTF for this APAR. * * * **************************************************************** Available documentation is not clear regarding the use of record I/O to read SYSIN input coming from the terminal under the USS environment. It is stated in the manual that stream I/O is the recommended method for accessing data via the terminal, but it does not say that record I/O can not be used. Items to be addressed by this APAR: 1. The latter part of the following statement is confusing and does not seem to apply to how PL/I currently works. This can be found in the Programming Guide, under the section "Redirecting standard input, output, and error devices under z/OS UNIX": READ statements can access data from stdin; however, the record into which the data is to be put must have an LRECL of 1. 2. It is unclear how to signal end-of-file for input coming from the terminal. 3. From testing various scenarios, two record I/O problems (using the READ statement) were discovered when input comes from the terminal. 3a. When running under z/OS UNIX foreground, the /* sequence was not recognized as an end-of-file marker. 3b. When running under BPXBATCH, reading from SYSIN via STDIN loops in the ENDFILE on-unit for the file. Including a GOTO statement in the on-unit circumvented the problem.
Problem conclusion
The following documentation changes will be made to the Enterprise PL/I for z/OS Version 4 Release 3 Programming Guide, GI11-9145-02, to provide more information in regards to the use of STDIN: 1. Under the chapter "Using data sets and files" section "Establishing data set characteristics" section "Specifying characteristics in the ENVIRONMENT attribute" section "Redirecting standard input, ouput, and error devices under z/OS UNIX" Modify the statement to read as follows: READ statements can also access data from stdin. 2. Under the chapter "Defining and using consecutive data sets" section "End-of-file" Replace the section text with the following: The characters / in position one and * in position two of a line that contains no other characters are treated as an end-of-file marker; that is, they raise the ENDFILE condition. Under the USS environment, the key sequence ESC-D can also be used to indicate the end-of-file marker. The ESC key is predefined as a specific character, and it is this predefined character that needs to be used in the sequence. 3a. Code has been modified in the PL/I run-time library to recognize the slash-asterisk sequence as an end-of-file marker for record I/O programs running under USS foreground with the SYSIN input coming from the terminal. 3b. Code has been modified in the PL/I run-time library to fix the loop that occurred in the ENDFILE on-unit when a program reads from SYSIN and is run under BPXBATCH.
Temporary fix
Comments
APAR Information
APAR number
PM74893
Reported component name
LE VA PL/I
Reported component ID
568819806
Reported release
770
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2012-10-11
Closed date
2013-02-06
Last modified date
2013-03-04
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK91451 UK91453 UK91452
Modules/Macros
IBMPRCAA
| GI11914502 |
Fix information
Fixed component name
LE VA PL/I
Fixed component ID
568819806
Applicable component levels
R760 PSY UK91451
UP13/02/08 P F302
R770 PSY UK91452
UP13/02/08 P F302
R780 PSY UK91453
UP13/02/08 P F302
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
Rate this page:
Average rating
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.