04-04-2023
docctong
Fluorite | Level 6
Member since
12-06-2016
- 14 Posts
- 2 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by docctong
Subject Views Posted 3647 09-20-2018 01:24 PM 3652 09-20-2018 01:07 PM 3701 09-19-2018 06:20 PM 3963 09-29-2017 05:36 PM 819 04-28-2017 04:41 PM 2574 04-07-2017 02:50 PM 1823 03-30-2017 10:27 AM 1873 03-24-2017 05:13 PM 1887 03-24-2017 04:02 PM -
Activity Feed for docctong
- Posted Re: Variable is uninitialized on SAS Studio. 09-20-2018 01:24 PM
- Posted Re: Variable is uninitialized on SAS Studio. 09-20-2018 01:07 PM
- Posted Variable is uninitialized on SAS Studio. 09-19-2018 06:20 PM
- Posted Put and Input Functions on SAS Programming. 09-29-2017 05:36 PM
- Posted How to Compare fields in Two Different Datasets on SAS Programming. 04-28-2017 04:41 PM
- Posted Using prxmatch with multiple terms on SAS Programming. 04-07-2017 02:50 PM
- Posted Re: Word Search Using Prxmatch on SAS Programming. 03-30-2017 10:27 AM
- Liked Re: Word Search Using Prxmatch for PGStats. 03-30-2017 10:27 AM
- Liked Re: Word Search Using Prxmatch for collinelliot. 03-30-2017 10:26 AM
- Posted Re: Word Search Using Prxmatch on SAS Programming. 03-24-2017 05:13 PM
- Posted Word Search Using Prxmatch on SAS Programming. 03-24-2017 04:02 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1
09-20-2018
01:24 PM
Thanks for the suggestion. I'll try and hopefully will find what the problem is.
... View more
09-20-2018
01:07 PM
Thanks for the help. The mistake that you pointed out in the code in fact does not exist because I removed couple folders in the path to keep the business info confidential and I missed taking one "/" out. Of course, I should have done better and thanks for pointing that out. The thing is that I ran this code in PC SAS for many months and it never had any problem. However, when I tried to run it in SAS Studio, it gave me this variable not initialized issue. I am the one who created the data and so I know for sure that the fields exist in Excel and the names are identical in both ABC-1 and ABC-2 (one again, I changed the name of the data set in the code to keep the business info unrevealed). Is there something different in the variable naming rules between PC SAS and SAS Studio? Thank you.
... View more
09-19-2018
06:20 PM
I am trying to import data into the SAS University Edition with the following code: proc import datafile="/folders/myfolders//ABC-P WEEKLY CLAIMS REPORT.XLSX" OUT=WORK.ABC1 DBMS=xlsx Replace; options MSGLEVEL=I; *range="Sheet1$"; *Getnames=yes; *Mixed=yes; *Scantext=yes; *Usedate=yes; *Scantime=yes; run; options validvarname=any; data work.abc1; set work.abc1; indemnityPDPaid = input(indemnity_PD_paid, dollar12.0); MedicalBIPaid=input(medical_BI_paid, dollar12.0); format indemnityPDpaid MedicalBIPaid Total_outstanding net_incurred dollar12.0; drop indemnity_PD_Paid Medical_BI_Paid; run; proc import datafile="/folders/myfolders/ABC-P WEEKLY CLOSED CLAIMS REPORT.XLSX" OUT=WORK.ABC2 DBMS=xlsx Replace; options MSGLEVEL=I; *range="Sheet1$"; *Getnames=yes; *Mixed=yes; *Scantext=yes; *Usedate=yes; *Scantime=yes; run; options validvarname=any; data work.abc2; set work.abc2; indemnityPDPaid = input(indemnity_PD_paid, dollar12.0); MedicalBIPaid=input(medical_BI_paid, dollar12.0); format indemnityPDpaid MedicalBIPaid net_incurred dollar12.0; drop indemnity_PD_Paid Medical_BI_Paid; run; As you can see the two sets of codes are almost identical. However, although I have no problem getting the "indemnityPDPaid" and "MedicalBIPaid" in the first dataset, i.e., work.abc1, I got error messages telling me that Variable indemnity_PD_paid is uninitialized and Variable medical_BI_paid is uninitialized. Any clue? Please help. Thanks.
... View more
09-29-2017
05:36 PM
I have a question on what is the purpose of using input and put functions together in the command below: Inc_date=input(put(var14,8.),yymmdd8.); Var14 is in a CSV file that I am importing into SAS. Thanks.
... View more
04-28-2017
04:41 PM
Hello All, I have two different datasets that provide info on claim amount paid by two different sources. Each set includes the claimant name, the date of incident, and the amount paid. So let's say Name1, Date1, and Paid 1 are fields in Set #1, and Name2, Date2, and Paid2 are fields in Set #2. Each of the two sets includes other fields that are not totally identical. What I need to do is to find out those claimants who are in both sets of data, i.e., Name1=Name2, and were injured on the same date and so Date1=Date2, and then create a new field named as TotalPaid = Paid1+Paid2. That is, I need to find out the total amount of paid for each claimant from both sources. For those claimants exist only in one and not both sets, then TotalPaid=0. The rationale of using these two conditions to set up the new field is because it is not likely that two individuals who got injured on the same date will have the same name. How can I do that? Thanks for helping.
... View more
04-07-2017
02:50 PM
I need to do a word search on a text field. While I know how to search for multiple words using the Prxmatch function, I am not sure how I can search words such as "fire suppression", "Young men", and etc, i.e., a simple phrase that has two words or more. If I were to split the phrase into two separate words, like "fire" and "suppression", then I will get many wrong matches due to the word "fire". The same is true for the words "Young" or "men". Is there a way to combine these words and use it in the Prxmatch function?
Thanks.
... View more
03-30-2017
10:27 AM
03-24-2017
05:13 PM
Thanks for the reply. Below is the code that I had written and trying to find the cases that broken tree is involved: data spct.tree; set treedata; if prxmatch("m/trees|limbs|branches/oi", combined_description) > 0 then tree=1; else tree=0; run; However, like I said, the results include cases that show something like "a man walking on the street" because "tree" is part of the word street. Since I have multiple words, as you can see, that I put in to search that I think is related to tree, how or where do I add the "\b" option so to take care of the problem? Thanks and truly appreciate your help.
... View more
03-24-2017
04:02 PM
I am using the prxmatch function to search for words in a variable. However, I got results that are not perfect match. In particular, I was trying to search for the word "tree", but I also got "street". How do I get a perfect match, i.e., to exclude results that have words that include words that I am actually searching for? Thanks.
... View more