Hello,
I have a process in mainframe that reads multiple files concatenated under the same ddname.
Is it possible to reset retained variables at the start of each file being read?
Thanks
Ubaldo
Yes. You'll likely need to modify your infile statement. The option EOV=variable
specifies a variable that SAS sets to 1 when the first record in a file in a series of concatenated files is read. The variable is set only after SAS encounters the next file. Like automatic variables, the EOV= variable is not written to the data set.
So you add EOV=NewFile (or similar to your INFILE statement);
If NewFile then do;
<statements to reset for the new file>
end;
Yes. You'll likely need to modify your infile statement. The option EOV=variable
specifies a variable that SAS sets to 1 when the first record in a file in a series of concatenated files is read. The variable is set only after SAS encounters the next file. Like automatic variables, the EOV= variable is not written to the data set.
So you add EOV=NewFile (or similar to your INFILE statement);
If NewFile then do;
<statements to reset for the new file>
end;
thank you, ballardw,
I looked for it only into the z/OS companion manual....
Thanks you again
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: