Review the SASLOG output closely - you will see a SAS diagnostic message which you may have overlooked, shown below:
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
Also, you most likely do not have a fixed-length (RECFM=F) record/file layout providing data (again info revealed in the INFILE diagnostic of your SAS log) in columns 1 through 25 on each record, so SAS is assigning a missing value.
First you must specify TRUNCOVER or MISSOVER, possibly -- review the INFILE statement coding. And second you want to review the INPUT statement processing to handle the shorter record length, rather than using the INPUT statement you have coded. I don't believe that this behavior is unique to the mainframe either - it is related to the input file layout and record format for your data.
For diagnostic information (self-debugging), consider adding either a :
LIST;
...or.... (tip: get to SAS 9 as soon as possble so you can use PUTLOG -- and so you can be on a supported SAS version):
FILE LOG;
PUT _ALL_;
Also, consider adding a sort step for your input file before you use BY processing. And I would encourage you to code a LENGTH statement to declare MNAME length explicitly.
Scott Barry
SBBWorks, Inc.