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".
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.