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

sas-innovate-2024.png

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.

 

Register now!

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
  • 737 views
  • 1 like
  • 2 in conversation