BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shikoulitz
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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;

View solution in original post

2 REPLIES 2
ballardw
Super User

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;

shikoulitz
Calcite | Level 5

thank you, ballardw,

I looked for it only into the z/OS companion manual....

 

Thanks you again

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1441 views
  • 1 like
  • 2 in conversation