I am very very new to SAS and I have a file that I am reading where I will take the unique key say a claim number that can also have a line_no so you can have multiple line_no per claim_number. I have been told to put some of the fields in what we are calling a header file and a trailer file. Each file will also have a unique key that I am already building to be the key of the trailer and header files.
My problem is that I have some fields that we are not sure if they can have multiple or just one instance of the fields from the main file. If the particular field say spec_cd is on the main file per record multiple times, I need to put it in the trailer record, if it is only in the file one time then it will be on the header.
I was told to try using the Proc Mean procedure but it didn't seem to give me the information I was looking for so I was told to try the keep statement with a count but not sure how to go about this.
Another tidbit about the data, one of the fields is an amount. I have 3 records on the main file with different line numbers with 3 different amounts, that is pretty easy to assume that the amount would go on the line but for some of the other fields, I just would like to count per record for the fields Tennisanyone.
Again, any help I would apprecaite it.
My problem is that I have some fields that we are not sure if they can have multiple or just one instance of the fields from the main file. If the particular field say spec_cd is on the main file per record multiple times, I need to put it in the trailer record, if it is only in the file one time then it will be on the header.
I was told to try using the Proc Mean procedure but it didn't seem to give me the information I was looking for so I was told to try the keep statement with a count but not sure how to go about this.
Another tidbit about the data, one of the fields is an amount. I have 3 records on the main file with different line numbers with 3 different amounts, that is pretty easy to assume that the amount would go on the line but for some of the other fields, I just would like to count per record for the fields Tennisanyone.
Again, any help I would apprecaite it.