Reading Specific Lines of a Text File

You can read a specific line of a text file by entering a line number as an argument on the LINEIN method. In this example, line 3 is read from CONFIG.SYS:

/* Read and display line 3 of CONFIG.SYS */"c:\config.sys")
say infile~linein(3)

You do not reduce file I/O by using specific line numbers. Because text files do not have a specific record length, Rexx must read through the file counting line-end characters to find the line you want.