Hi all,
Please help me to code this. This is the dataset below-
I have 2 drugs being used for each ID i.e., SGA and DM. I have multiple start date and end dates for each ID and drug. I want to see if the DM_start falls into any of the SGA_start and SGA_end under each id. That is DM_start of period 3 can fall in the SGA_start and SGA_end of period1.
And also calculate the number of overlapping days for each time period. I want to know the no. of days for each orange period.
Thank you all in advance,
Any help would be appreciated.
... View more
Please help me with error: Error: The connection could not be established to a SAS Workspace Server named 'Local' running on port on host 'localhost'. Please verify the following: - The correct hostname and port number were specified. - If a firewall is present, it is correctly configured to allow this access. - An object spawner has been started on the server. - The SETINIT on the server is not expired. Please contact your SAS Administrator if the problem persists. Server response: Server execution failed
... View more
Hello Everyone, I am facing an issue with SAS Viya user activity report as SAS Job to update CAS audit data keeps on failing in SAS Viya 4. I have different types of user IDs which authenticate to SAS Viya. Most of them are just numbers and few are only characters. I am able to list the data from CLI, but it fails when data is being uploaded to CAS table (from CSV) for reporting. NOTE: Active Session now server. {rowsDeleted=0} ERROR: The variable User ID has been specified with incompatible data types. as per my initial investigation, I suspect this is because of the GUSSINGROWS function of SAS import. so it only considers first 20 rows (default) to decide the data type of a column. So if there are only number IDs in first 20 rows, it decides the data type as "double", but as there can be character user IDs also, the data type should be varchar and then, it fails with above error. Is there a way to change this default value or anyone who has faced similar problem and was able to fix this?
... View more
I'm having difficulty writing a piece of SAS code and I'm seeking the most effective approach within SAS. I have a variable named 'type' (with values 1, 2, 3, 4) and client IDs. Essentially, I aim to create another variable called 'modified_type,' which follows these rules: If there's a single unique client ID with only 1 in the 'type' variable, then 'modified_type' should be set to 0. However, if there are multiple client IDs with the same number having 1 in the 'type' variable, 'modified_type' should be set to 1. If there are 2 in the 'type' variable, then 'modified_type' should be set to 2... and so on. I tried using the retain function so something like this: retain modified_type 0; if first.client_id then modified_type = 0; if type = '1' or type = '1st' then modified_type = 1; else if type = '2' or = '2nd' then modified_type = 2; and so on..... but these does seem to retain 0 in the type and for some reason shows as 1. Yea im note sure the best way to do this, a newbie at SAS so would even appreciate the point in the right direction:
... View more