07-15-2020
kgflynn
Fluorite | Level 6
Member since
01-30-2014
- 4 Posts
- 2 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by kgflynn
Subject Views Posted 1309 11-20-2019 07:25 AM 1378 11-19-2019 11:32 AM 2439 08-16-2017 09:25 AM 2466 08-16-2017 08:04 AM -
Activity Feed for kgflynn
- Posted Re: Hash object output dataset on SAS Programming. 11-20-2019 07:25 AM
- Liked Re: Hash object output dataset for novinosrin. 11-20-2019 07:23 AM
- Liked Re: Hash object output dataset for Tom. 11-20-2019 07:23 AM
- Posted Hash object output dataset on SAS Programming. 11-19-2019 11:32 AM
- Posted Re: How to concatenate string and declare as date constant on SAS Enterprise Guide. 08-16-2017 09:25 AM
- Posted How to concatenate string and declare as date constant on SAS Enterprise Guide. 08-16-2017 08:04 AM
-
Posts I Liked
Subject Likes Author Latest Post 2 4
11-19-2019
11:32 AM
Hi, I have borrowed this code which works ok and I don't understand the hash object just yet. I would like to know if there is a way to have the variable 'sourcedID' as the directory name instead of part of the filename. For example it currently creates E:\Test\ orgs_350.sas7bdat E:\Test\orgs_360.sas7bdat etc. and I would like this: E:\Test\350\orgs.sas7bdat E:\Test\360\orgs.sas7bdat Thanks for any help! libname e 'E:\Test'; data _null_; if _n_=1 then do; if 0 then set work.orgs; declare hash h(dataset:'work.orgs(obs=0)',multidata:'y'); h.definekey(all:'y'); h.definedata(all:'y'); h.definedone(); end; do until(last.sourcedid); set work.orgs; by sourcedId; h.add(); end; h.output(dataset:"e.orgs_" || sourcedid ); h.clear(); run;
... View more
08-16-2017
09:25 AM
Thanks! That works perfectly.
... View more
08-16-2017
08:04 AM
Is this possible to do in Enterprise Guide filter? I usually do a date compare in a filter like this that works fine: datepart(exit_date) >= '15Aug2017'd However I would like the to set it up so the year is dynamic, something like: '15Aug' || PUT(YEAR(Date()-181), 4.) This code produces the correct character format I want 15Aug2017, but I can't just put a 'd' at the end to assign it as date constant for comparison. Any suggestions would be much appreciated. Thanks, Kenny. EG 6.1 SAS 9.4
... View more