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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.