Question: rexx how to read a file?
Answer: In order to read or write a file using REXX, first step is to allocate a DDNAME. ... 
Step 1: Allocate ddname to the input file.
"ALLOC FI(INDD) DA('"PDSNAME"("MEMNAME")') SHR "
Step2: Read all records from the file and store in the stem variable Line.