Help using Base SAS procedures

Code check

Accepted Solution Solved
Reply
Super Contributor
Posts: 1,041
Accepted Solution

Code check

Hi,

I have the following code and I am getting  the value of MXCNT=1

Could you tell me where I am going wrong???


Accepted Solutions
Solution
‎05-06-2013 01:00 PM
Super User
Posts: 11,343

Re: Code check

Posted in reply to robertrao

How many values of VPFX do you have for each value of MRN1? If there is only one then that's what's going on. Code without data is a tad hard to diagnosis for specific values.

If you are only looking at the value of the Put statement when LAST then the above is critical for the last combination of MRN1 and VPFX.

If you have more than one value of MRN1 you probably aren't getting what you want uness you only want the count for the last value of MRN1.

View solution in original post


All Replies
Solution
‎05-06-2013 01:00 PM
Super User
Posts: 11,343

Re: Code check

Posted in reply to robertrao

How many values of VPFX do you have for each value of MRN1? If there is only one then that's what's going on. Code without data is a tad hard to diagnosis for specific values.

If you are only looking at the value of the Put statement when LAST then the above is critical for the last combination of MRN1 and VPFX.

If you have more than one value of MRN1 you probably aren't getting what you want uness you only want the count for the last value of MRN1.

Super Contributor
Posts: 1,041

Re: Code check

Hi Thanks for the reply.

There are multiple VPFX for each value of MRN1

Super User
Super User
Posts: 7,039

Re: Code check

Posted in reply to robertrao

You are counting how many copies of a particular VPFX there are.  So if the MAX is 1 then the combination of MRN1 and VPFX uniquely identifies the observation.

Perhaps you wanted FIRST.MRN1 instead of FIRST.VPFX so that you could count the max number of VPFX per MRN1?

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 170 views
  • 3 likes
  • 3 in conversation