BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
makset
Obsidian | Level 7

Please help
I have a table A (about 2GB) and I want to divide it depending on the variable number that is eaten in this table.
Please use the hash table.
I really care about the speed of the command.
I am a beginner in hash so please bear with us.

data A;
informat datetime  datetime21.;
input datetime	Nr	temperature_1	temperature_2	temperature_3	temperature_4	temperature_5	temperature_6	temperature_7	temperature_8	temperature_9	temperature_10	pressure_1	pressure_2	pressure_3	pressure_4	pressure_5	pressure_6	pressure_7	pressure_8	pressure_9	pressure_10 ; 
format datetime  datetime21.;
cards;
01NOV2012:20:09:00	112113	8.8386586448	9.7382110218	5.0758258603	8.8694050722	6.8936349358	9.432546082	9.2878638301	4.8766398407	7.7988508134	8.7713846681	1	1	1	1	1	1	1	1	1	1
19DEC2013:00:09:00	112113	3.1682274491	3.8016460347	0.0828465261	6.5064271912	7.5012415438	0.2482288703	8.2464989461	4.0366380266	4.2733701062	5.230450104	61	61	61	61	61	61	61	61	61	61
29OCT2014:23:09:00	112113	4.2798770685	7.3606959847	9.6644437662	0.4209582577	6.5941452747	0.6463373546	2.728187507	7.1689701942	3.5560273053	2.1887783287	121	121	121	121	121	121	121	121	121	121
07DEC2017:23:09:00	112113	0.4644698882	7.4807286961	5.35556752	9.3602973665	7.9723406397	1.3072503288	0.65210792	5.4844892211	7.0024573081	6.0352300038	181	181	181	181	181	181	181	181	181	181
28JAN2004:23:09:00	112114	3.4588757018	0.9221725771	8.3306752145	4.5803881995	8.2675979147	9.1477185837	5.7202544645	7.9451231612	0.9673189698	1.8442960829	241	241	241	241	241	241	241	241	241	241
28MAR2006:23:09:00	112114	6.3791716751	2.1213577455	7.9790208535	5.2773255971	8.6945169419	1.6644138051	0.0204887614	5.0024614809	5.4114883579	6.6648952151	301	301	301	301	301	301	301	301	301	301
19OCT2011:00:09:00	112114	6.7945698788	5.6084340392	9.3033694685	0.8323060418	6.897864067	6.0847914289	4.7261788161	4.3651668495	5.3854351002	9.6577573661	361	361	361	361	361	361	361	361	361	361
16DEC2013:19:09:00	112114	3.7592288386	5.5167134176	7.3533652583	5.7666407409	8.0186763406	5.0429561432	4.3662598124	8.0805433588	1.0869284347	3.2223363873	421	421	421	421	421	421	421	421	421	421
23SEP2014:19:09:00	112114	5.7138312096	9.8083063331	0.7149568223	6.3757409411	6.7465888965	1.9086576509	8.1664893031	3.7590556568	7.3485474777	9.9914430827	481	481	481	481	481	481	481	481	481	481
11FEB2019:19:09:00	112114	8.5294209281	1.6220973455	7.9244413553	9.1218567034	7.1427283529	4.5025826711	2.4023903767	9.7427219199	9.1612814669	6.319673683	541	541	541	541	541	541	541	541	541	541
11MAR2008:17:09:00	112115	7.3827899154	7.210859051	8.8476096536	4.682344154	9.9290248146	8.2291204389	8.0297554797	3.9942333312	9.6723125875	6.8582974235	601	601	601	601	601	601	601	601	601	601
15MAY2009:20:09:00	112115	0.6967037264	2.209698474	7.0656412118	3.4976043901	6.3166508637	4.1500182427	8.1335787382	0.5143562239	5.0487393979	3.2850281289	661	661	661	661	661	661	661	661	661	661
10MAR2011:05:09:00	112115	4.9747866485	7.05029523	1.1164530157	6.705195969	3.0150882155	3.6897646612	0.0299303746	1.6008544178	8.6340258014	9.5965762227	721	721	721	721	721	721	721	721	721	721
06FEB2012:04:09:00	112115	0.4850171693	3.0325717526	1.9730921229	9.1757692955	1.7643042444	2.2333751363	0.3155178041	5.5754801724	9.6805345081	0.4472889821	781	781	781	781	781	781	781	781	781	781
27MAR2012:14:09:00	112115	0.6278450065	4.8086930346	3.9867412089	4.087025465	4.2292779218	9.7946837055	9.5147549128	2.3544393363	6.5958845848	7.1473370702	841	841	841	841	841	841	841	841	841	841
03MAR2015:21:09:00	112115	3.0274132919	4.6789796697	3.2627761643	6.2627409864	9.4722208031	7.2383880219	8.4133591177	3.0224332935	2.2182885674	3.8854886894	901	901	901	901	901	901	901	901	901	901
20JAN2016:13:09:00	112115	8.8339482551	9.9984312756	3.6358541274	5.2535630809	3.2169948774	6.7585500027	0.8276014449	1.0962000792	3.3902002592	1.8370366748	961	961	961	961	961	961	961	961	961	961
05AUG2016:22:09:00	112115	8.216716242	8.7472304446	0.4472922022	5.6399317854	7.9897754826	1.4684082754	1.9898261293	4.106047512	8.7406910001	2.638587181	1021	1021	1021	1021	1021	1021	1021	1021	1021	1021
run;

data want_112113;
informat datetime  datetime21.;
input datetime	Nr	temperature_1	temperature_2	temperature_3	temperature_4	temperature_5	temperature_6	temperature_7	temperature_8	temperature_9	temperature_10	pressure_1	pressure_2	pressure_3	pressure_4	pressure_5	pressure_6	pressure_7	pressure_8	pressure_9	pressure_10 ; 
format datetime  datetime21.;
cards;
01NOV2012:20:09:00	112113	8.8386586448	9.7382110218	5.0758258603	8.8694050722	6.8936349358	9.432546082	9.2878638301	4.8766398407	7.7988508134	8.7713846681	1	1	1	1	1	1	1	1	1	1
19DEC2013:00:09:00	112113	3.1682274491	3.8016460347	0.0828465261	6.5064271912	7.5012415438	0.2482288703	8.2464989461	4.0366380266	4.2733701062	5.230450104	61	61	61	61	61	61	61	61	61	61
29OCT2014:23:09:00	112113	4.2798770685	7.3606959847	9.6644437662	0.4209582577	6.5941452747	0.6463373546	2.728187507	7.1689701942	3.5560273053	2.1887783287	121	121	121	121	121	121	121	121	121	121
07DEC2017:23:09:00	112113	0.4644698882	7.4807286961	5.35556752	9.3602973665	7.9723406397	1.3072503288	0.65210792	5.4844892211	7.0024573081	6.0352300038	181	181	181	181	181	181	181	181	181	181

run;


data want_112114;
informat datetime  datetime21.;
input datetime	Nr	temperature_1	temperature_2	temperature_3	temperature_4	temperature_5	temperature_6	temperature_7	temperature_8	temperature_9	temperature_10	pressure_1	pressure_2	pressure_3	pressure_4	pressure_5	pressure_6	pressure_7	pressure_8	pressure_9	pressure_10 ; 
format datetime  datetime21.;
cards;
28JAN2004:23:09:00	112114	3.4588757018	0.9221725771	8.3306752145	4.5803881995	8.2675979147	9.1477185837	5.7202544645	7.9451231612	0.9673189698	1.8442960829	241	241	241	241	241	241	241	241	241	241
28MAR2006:23:09:00	112114	6.3791716751	2.1213577455	7.9790208535	5.2773255971	8.6945169419	1.6644138051	0.0204887614	5.0024614809	5.4114883579	6.6648952151	301	301	301	301	301	301	301	301	301	301
19OCT2011:00:09:00	112114	6.7945698788	5.6084340392	9.3033694685	0.8323060418	6.897864067	6.0847914289	4.7261788161	4.3651668495	5.3854351002	9.6577573661	361	361	361	361	361	361	361	361	361	361
16DEC2013:19:09:00	112114	3.7592288386	5.5167134176	7.3533652583	5.7666407409	8.0186763406	5.0429561432	4.3662598124	8.0805433588	1.0869284347	3.2223363873	421	421	421	421	421	421	421	421	421	421
23SEP2014:19:09:00	112114	5.7138312096	9.8083063331	0.7149568223	6.3757409411	6.7465888965	1.9086576509	8.1664893031	3.7590556568	7.3485474777	9.9914430827	481	481	481	481	481	481	481	481	481	481
11FEB2019:19:09:00	112114	8.5294209281	1.6220973455	7.9244413553	9.1218567034	7.1427283529	4.5025826711	2.4023903767	9.7427219199	9.1612814669	6.319673683	541	541	541	541	541	541	541	541	541	541

run;


data want_112115;
informat datetime datetime21.;
input datetime	Nr	temperature_1	temperature_2	temperature_3	temperature_4	temperature_5	temperature_6	temperature_7	temperature_8	temperature_9	temperature_10	pressure_1	pressure_2	pressure_3	pressure_4	pressure_5	pressure_6	pressure_7	pressure_8	pressure_9	pressure_10 ; 
format datetime  datetime21.;
cards;
11MAR2008:17:09:00	112115	7.3827899154	7.210859051	8.8476096536	4.682344154	9.9290248146	8.2291204389	8.0297554797	3.9942333312	9.6723125875	6.8582974235	601	601	601	601	601	601	601	601	601	601
15MAY2009:20:09:00	112115	0.6967037264	2.209698474	7.0656412118	3.4976043901	6.3166508637	4.1500182427	8.1335787382	0.5143562239	5.0487393979	3.2850281289	661	661	661	661	661	661	661	661	661	661
10MAR2011:05:09:00	112115	4.9747866485	7.05029523	1.1164530157	6.705195969	3.0150882155	3.6897646612	0.0299303746	1.6008544178	8.6340258014	9.5965762227	721	721	721	721	721	721	721	721	721	721
06FEB2012:04:09:00	112115	0.4850171693	3.0325717526	1.9730921229	9.1757692955	1.7643042444	2.2333751363	0.3155178041	5.5754801724	9.6805345081	0.4472889821	781	781	781	781	781	781	781	781	781	781
27MAR2012:14:09:00	112115	0.6278450065	4.8086930346	3.9867412089	4.087025465	4.2292779218	9.7946837055	9.5147549128	2.3544393363	6.5958845848	7.1473370702	841	841	841	841	841	841	841	841	841	841
03MAR2015:21:09:00	112115	3.0274132919	4.6789796697	3.2627761643	6.2627409864	9.4722208031	7.2383880219	8.4133591177	3.0224332935	2.2182885674	3.8854886894	901	901	901	901	901	901	901	901	901	901
20JAN2016:13:09:00	112115	8.8339482551	9.9984312756	3.6358541274	5.2535630809	3.2169948774	6.7585500027	0.8276014449	1.0962000792	3.3902002592	1.8370366748	961	961	961	961	961	961	961	961	961	961
05AUG2016:22:09:00	112115	8.216716242	8.7472304446	0.4472922022	5.6399317854	7.9897754826	1.4684082754	1.9898261293	4.106047512	8.7406910001	2.638587181	1021	1021	1021	1021	1021	1021	1021	1021	1021	1021
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  For proof of concept, only using 2 temperature variables:

Cynthia_sas_0-1595602726199.png

 

Based on this library article: https://communities.sas.com/t5/SAS-Communities-Library/Splitting-a-SAS-data-set-based-on-the-value-o...

 

Hope this helps,

Cynthia

 

View solution in original post

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  For proof of concept, only using 2 temperature variables:

Cynthia_sas_0-1595602726199.png

 

Based on this library article: https://communities.sas.com/t5/SAS-Communities-Library/Splitting-a-SAS-data-set-based-on-the-value-o...

 

Hope this helps,

Cynthia

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 288 views
  • 0 likes
  • 2 in conversation