09-01-2015
Rasheed
Calcite | Level 5
Member since
09-02-2014
- 84 Posts
- 0 Likes Given
- 0 Solutions
- 1 Likes Received
-
Latest posts by Rasheed
Subject Views Posted 1052 08-30-2015 09:22 AM 1052 08-30-2015 08:51 AM 3222 08-30-2015 08:15 AM 3222 08-30-2015 07:24 AM 961 08-30-2015 04:52 AM 3268 08-30-2015 04:22 AM 3268 08-30-2015 04:09 AM 3268 08-28-2015 11:45 PM 3268 08-28-2015 01:55 PM 3431 08-28-2015 12:43 PM -
Activity Feed for Rasheed
- Posted Re: Sub data sets on SAS Data Management. 08-30-2015 09:22 AM
- Posted Re: Sub data sets on SAS Data Management. 08-30-2015 08:51 AM
- Posted Re: Sub data sets on SAS Data Management. 08-30-2015 08:15 AM
- Posted Re: Sub data sets on SAS Data Management. 08-30-2015 07:24 AM
- Posted Do loop on SAS Data Management. 08-30-2015 04:52 AM
- Posted Re: Sub data sets on SAS Data Management. 08-30-2015 04:22 AM
- Posted Re: Sub data sets on SAS Data Management. 08-30-2015 04:09 AM
- Posted Re: Sub data sets on SAS Data Management. 08-28-2015 11:45 PM
- Posted Re: Sub data sets on SAS Data Management. 08-28-2015 01:55 PM
- Posted Sub data sets on SAS Data Management. 08-28-2015 12:43 PM
- Posted Re: Call execute on SAS Data Management. 08-28-2015 12:21 PM
- Posted Re: Call execute on SAS Data Management. 08-26-2015 01:02 PM
- Posted Re: Call execute on SAS Data Management. 08-26-2015 12:44 PM
- Posted Re: Call execute on SAS Data Management. 08-26-2015 11:45 AM
- Posted Call execute on SAS Data Management. 08-26-2015 11:24 AM
- Posted Re: Out of Memory Error on SAS Data Management. 08-26-2015 05:10 AM
- Posted Re: Out of Memory Error on SAS Data Management. 08-26-2015 05:03 AM
- Posted Out of Memory Error on SAS Data Management. 08-26-2015 04:47 AM
- Posted Re: Data management on SAS Data Management. 08-21-2015 09:32 AM
- Posted Data management on SAS Data Management. 08-21-2015 08:33 AM
-
My Liked Posts
Subject Likes Posted 1 06-25-2015 02:46 AM
08-30-2015
09:22 AM
When I used cats instead catx the problem is even bigger this time now it removes all spaces and produced data CCD_1; setCD_11CD_12CD_13CD_14CD_15CD_16CD_17CD_18CD_19CD_110; rename COL1=C; -------------------------------------------------------------------------------------------------------------
... View more
08-30-2015
08:15 AM
now it working fine but only one error of space between set and CD_11 log error is data CCD_1; setCD_11 CD_12 CD_13 CD_14 CD_15 CD_16 CD_17 CD_18 CD_19 CD_110; rename I am using following sas code data want; length names $ 200; do j=1 to 11; names=''; do i = 1 to 10; names = catx(' ',names,cats("CD_",J,I)); end; call execute(cats('data CCD_',put(j,8.),'; set ', names ,'; rename COL1=C;')); end; run;
... View more
08-30-2015
07:24 AM
When I run you above menetion code and try to print data set CCD_1 the log says that ERROR: File WORK.CCD_1.DATA does not exist. data want; length names $ 200; do j=1 to 11; names=''; do i = 1 to 10; names = catx(' ',names,cats("CD_",J,I)); end; str=cats('data CCD_',put(j,8.),'; set ', names ,'; rename COL1=C;'); put str; end; run; Proc print data=CCD_1; run;
... View more
08-30-2015
04:52 AM
I have data sets like AD_11 AD_12 ........AD_110 AD_21 AD_22.........AD_210 ................................................ AD_111 AD_112.........AD_1110 Each data sets have single observation Now I want merge data sets AD_11 AD_12 AD_13 ..... AD_110 into data set AAD_1 similarly AD_21 AD_22 AD_23..... AD_210 into data set AAD_2 For this purspose I m using following sas program data _null_; do j=1 to 11; call execute(cats('data AAD_',put(j,8.),';')); do i = 1 to 10; sk=catt(j,i); skn=inputn(sk,'6.',6,0); call execute(cats ('set AD_',put(skn,8.),'; rename COL1=A;' )); end; end; run; But when I run this program then for inner do loop ( i) it reads 10 obs from 10 data sets AD_11 to AD_110 but save only single value to AAD_1, however it should save all ten observation to AAD_1
... View more
08-30-2015
04:22 AM
Dear ballardw I would be realy gratefull to you if could write complete statment of call execute inculding names variables becuase i tried it multiple times but getting errors pls
... View more
08-30-2015
04:09 AM
My problem is not solved yet please guide me towards its solution
... View more
08-28-2015
11:45 PM
I am trying this but it gives error data _null_; do j=1 to 10; call execute(cats('data CCD_',put(j,8.),'; set names ; rename COL1=C;' )); end; run; Log error 1 + data CCD_1; set names ; rename COL1=C; ERROR: File WORK.NAMES.DATA does not exist.
... View more
08-28-2015
01:55 PM
Thanks ballardw I have successfully generated variables names CD_11 CD_12 CD_13 CD_14 CD_15 CD_16 CD_17 CD_18 CD_19 CD_110 CD_21 CD_22 CD_23 CD_24 CD_25 CD_26 CD_27 CD_28 CD_29 CD_210 CD_31 CD_32 CD_33 CD_34 CD_35 CD_36 CD_37 CD_38 CD_39 CD_310 CD_41 CD_42 CD_43 CD_44 CD_45 CD_46 CD_47 CD_48 CD_49 CD_410 CD_51 CD_52 CD_53 CD_54 CD_55 CD_56 CD_57 CD_58 CD_59 CD_510 CD_61 CD_62 CD_63 CD_64 CD_65 CD_66 CD_67 CD_68 CD_69 CD_610 CD_71 CD_72 CD_73 CD_74 CD_75 CD_76 CD_77 CD_78 CD_79 CD_710 CD_81 CD_82 CD_83 CD_84 CD_85 CD_86 CD_87 CD_88 CD_89 CD_810 CD_91 CD_92 CD_93 CD_94 CD_95 CD_96 CD_97 CD_98 CD_99 CD_910 CD_101 CD_102 CD_103 CD_104 CD_105 CD_106 CD_107 CD_108 CD_109 CD_1010 CD_111 CD_112 CD_113 CD_114 CD_115 CD_116 CD_117 CD_118 CD_119 CD_1110 But I am confused where should I use names in my following code to get my output data _null_; do j=1 to 11; call execute(cats('data CCD_',put(j,8.),'; set CD_',put(j,8.),'1:CD_',put(j,8.),'10; rename COL1=A;' )); end; run;
... View more
08-28-2015
12:43 PM
I have data sets like CD_11 CD_12 ........CD_110 CD_21 CD_22.........CD_210 ................................................ CD_111 CD_112.........CD_1110 Now I want merge data sets CD_11 CD_12 CD_13 ..... CD_110 into data set CCD_1 similarly CD_21 CD_22 CD_23..... CD_210 into data set CCD_2 .............................................................................. and CD_111 CD_112 CD_113 ..... CD_1110 into data set CCD_11 For this I am using following sas command data _null_; do j=1 to 11; call execute(cats('data CCD_',put(j,8.),'; set CD_',put(j,8.),'1:CD_',put(j,8.),'10; rename COL1=A;' )); end; run; But it is not producing desired output Pls help
... View more
08-28-2015
12:21 PM
Ok thank you now it work fine I have an other query I have data sets like CD_11 CD_12 ........CD_110 CD_21 CD_22.........CD_210 ................................................ CD_111 CD_112.........CD_1110 Now I want merge data sets CD_11 CD_12 CD_13 ..... CD_110 into data set CCD_1 similarly CD_21 CD_22 CD_23..... CD_210 into data set CCD_2 .............................................................................. and CD_111 CD_112 CD_113 ..... CD_1110 into data set CCD_11 For this I am using following sas command data _null_; do j=1 to 11; call execute(cats('data CCD_',put(j,8.),'; set CD_',put(j,8.),'1:CD_',put(j,8.),'10; rename COL1=A;' )); end; run; But it is not producing desired output Pls help
... View more
08-26-2015
01:02 PM
Ok I am using following code but still get error data _null_; do j=1 to 2; call execute(cats('DATA SIM_',j) ||';merge') ; do prefix = 'AAD_','BBD_','CCD_' ; call execute(' ' || cats(prefix,j)); end; call execute(cats(MIBC = 5*(A) +B+ C -(6/2))); call execute(';run;'); end; run; error on log NOTE: Variable A is uninitialized. NOTE: Variable B is uninitialized. NOTE: Variable C is uninitialized. NOTE: Variable MIBC is uninitialized. NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 2 at -38258:-41 2 at -38258:-37 2 at -38258:-35 2 at -38258:-29 NOTE: DATA statement used (Total process time): real time 0.02 seconds cpu time 0.01 seconds NOTE: CALL EXECUTE generated line. 1 + DATA SIM_1;merge 2 + AAD_1 3 + BBD_1 4 + CCD_1 NOTE: Line generated by the CALL EXECUTE routine. 5 + 1 - 22 200 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;, END, _DATA_, _LAST_, _NULL_.
... View more
08-26-2015
12:44 PM
thank it works fine One thing I want to know whether call execute allow some calculation or not that is I want MIBC= 0.5*(A) +B+ C -(6/2) for both data sets So I am doing this data _null_; do j=1 to 2; call execute(cats('DATA SIM_',j) ||';merge') ; do prefix = 'AAD_','BBD_','CCD_' ; call execute(' ' || cats(prefix,j)); end; call execute('MIBC= 0.5*(A) +B+ C -(6/2);'); call execute(';run;'); end; run; But gives some error NOTE: Line generated by the CALL EXECUTE routine. 11 + MIBC= 5*(A) +B+ C -(6/2); - 22 76 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;, END, _DATA_, _LAST_, _NULL_. ERROR 76-322: Syntax error, statement will be ignored.
... View more
08-26-2015
11:45 AM
So how could I add space in merge command? can you specify please
... View more
08-26-2015
11:24 AM
I have data sets AAD_1, AAD_2, BBD_1, BBD_2, CCD_1, CCD_2, and I want to merge AAD_1, BBD_1 and CCD_1 in data set sim_1 and want to merge AAD_2, BBD_2 and CCD_2 in data set sim_2 For this I am using following sas command but there is one error ( I think error space) data _null_; do j=1 to 2; call execute(cats(" ",'Data sim_',put(j,1.),';merge AAD_',put(j,1.),'BBD_',put(j,1.),'CCD_',put(j,1.),'; run;')); end; The log error is NOTE: CALL EXECUTE generated line. 1 + Data sim_1;merge AAD_1BBD_1CCD_1; run; ERROR: File WORK.AAD_1BBD_1CCD_1.DATA does not exist. Kindly help in this regard
... View more