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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.