can we use logical variables(first. , last.) in proc report?
Would you please use a subject title that states what you are working with. Subject like "Can we do" what? Jump rope, fly like a bird or search for something at SAS support.
if you search SAS you can answer many of your own questions.
https://communities.sas.com/t5/SAS-Programming/how-to-delete-file/m-p/496015
AS Kurt and others have said do a little searching yourself. Then ask questions around the parts you are having issues with, or that are unclear in the documentation.
Let your fingers do the walking.
If you try to answer yourself you will learn a lot more, and when you get a job using SAS you will have some knowledge not just code snips that others have provided for you that you have placed into your code library..
You could use
COMPUTE BEFORE group_variable;
COMPUTE AFTER group_variable;
instead of FIRST, LAST .
That deserves a "Yes we can".
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.