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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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: