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

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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