Although the coding appears to be “correct”, it doesn’t seem to be right. The *RECORD value doesn’t have anything to do with the number of records in a file — it would hold the <i>name</i> of the record format.
If you want the number of records that existed at the time the file was opened, I believe it should look this way:<pre>
I B 156 1590RCDCNT</pre>
Use that line of code instead of your *RECORD line. Or leave the *RECORD line in place if you want it for some reason. The number of records should then be in variable RCDCNT after the file is opened for input.