Hi Sas community
I ran a code that used to work routinely. Now I ran the same code on a newly installed sas on a new computer
and keep getting this and freezes up unless i terminate the sas and occasional lose information on the code. It happens to anohter code which led me to think there is something wrong with SAS installation
any thoughts are appreciated
Did you follow the instructions in that error message?
Show us the code you are using.
What changed?
If the code did not change (and I strongly suggest a close look to make sure it didn't) then something in your system changed that is affecting the code.
For example, my organization made us move all of our working files to a One-drive set up. What the brilliant folks in our IT department didn't pay a bit of attention to was file path links. The way they set up the one drive the path to every single file was at least 40 characters longer than it had been if the files were just moved from a working drive to the one-drive location maintaining the current folder structure.
Which meant some files didn't make it because the paths exceeded what Windows will allow. Not everything but some.
You may
thanks
here are my codes
data MYK007_20241105_final ;
retain age gender study_id subject_id visit_name Date_study htm wtm BMI BSA sbp dbp hr contrast_given contrast_agent Field_strength gad_vol time_inj Hct date_hct
Lv_mass Lv_massi lvedv lvedvi lvesv lvesvi lvsv lvsvi lvef co ci
Lge1_4SD Lge2_4SD Lge3_4SD Lge4_4SD Lge5_4SD Lge6_4SD Lge7_4SD Lge8_4SD Lge9_4SD Lge10_4SD
Lge11_4SD Lge12_4SD Lge13_4SD Lge14_4SD Lge15_4SD Lge16_4SD Lge_mass_4SD Lge_pct_4SD
Lge1_5SD Lge2_5SD Lge3_5SD Lge4_5SD Lge5_5SD Lge6_5SD Lge7_5SD Lge8_5SD Lge9_5SD Lge10_5SD
Lge11_5SD Lge12_5SD Lge13_5SD Lge14_5SD Lge15_5SD Lge16_5SD Lge_mass_5SD Lge_pct_5SD
Lge1_6SD Lge2_6SD Lge3_6SD Lge4_6SD Lge5_6SD Lge6_6SD Lge7_6SD Lge8_6SD Lge9_6SD Lge10_6SD
Lge11_6SD Lge12_6SD Lge13_6SD Lge14_6SD Lge15_6SD Lge16_6SD Lge_mass_6SD Lge_pct_6SD
wt1 wt2 wt3 wt4 wt5 wt6 wt7 wt8 wt9 wt10 wt11 wt12 wt13 wt14 wt15 wt16 wt_max
wt1_max wt2_max wt3_max wt4_max wt5_max wt6_max wt7_max wt8_max wt9_max wt10_max wt11_max wt12_max wt13_max wt14_max wt15_max wt16_max
T1pre1 T1pre2 T1pre3 T1pre4 T1pre5 T1pre6 T1pre7 T1pre8 T1pre9 T1pre10 T1pre11 T1pre12 T1pre13 T1pre14 T1pre15 T1pre16
ECVF1 ECVF2 ECVF3 ECVF4 ECVF5 ECVF6 ECVF7 ECVF8 ECVF9 ECVF10 ECVF11 ECVF12 ECVF13 ECVF14 ECVF15 ECVF16 ECVF_global
Tau1 Tau2 Tau3 Tau4 Tau5 Tau6 Tau7 Tau8 Tau9 Tau10 Tau11 Tau12 Tau13 Tau14 Tau15 Tau16 Tau_global
Rv_mass Rv_massi rvedv rvedvi rvesv rvesvi rvsv rvsvi rvef
length4cham_sys length4cham_pre length4cham_post length3cham_sys length3cham_pre length3cham_post length2cham_sys length2cham_pre length2cham_post
width4cham_sys width4cham_pre width4cham_post width3cham_sys width3cham_pre width3cham_post width2cham_sys width2cham_pre width2cham_post
area4cham_sys area4cham_pre area4cham_post area3cham_sys area3cham_pre area3cham_post area2cham_sys area2cham_pre area2cham_post
special_note
reservoiramt contractileamt totalamt reservoirpct contractilepct totalpct
lav_max lav_min lav_maxi lav_mini lav_max_ht lav_min_ht
lvesv_ht lvedv_ht lvsv_ht co_ht lv_mass_ht
mcf
ec_mass ec_massi ec_mass_ht
ECVFi ECVF_ht
mcf2
lvrv_mass lvrv_massi lvrv_mass_ht
;
set MYK007_20241105_b ;
run;
proc sort data=myk007_20241105_Final; by subject_id visit_name; run;
proc means n nmiss mean min max data=MYK007_20241105_final; var _numeric_; run;
the proc means will run but then it will lock up and showed this message and the only way out is to shut down SAS
The output window does not allow entry of any of BOTTOM, Forward or End
Just wondering if there is something wrong with the SAS installation as this is a newly installed laptop. The same code ran on a different computer (with data files stored in similar paths) had no such issue.
thanks
From the looks of it you're using the "PC SAS client". If so then the requested commands would go as highlighted below.
Running below code I can't replicate what you describe with either PC SAS or EG. If you run exactly below code do you still observe the issue?
data MYK007_20241105_final;
retain age gender study_id subject_id visit_name Date_study htm wtm BMI BSA sbp dbp hr contrast_given contrast_agent Field_strength gad_vol time_inj Hct date_hct
Lv_mass Lv_massi lvedv lvedvi lvesv lvesvi lvsv lvsvi lvef co ci
Lge1_4SD Lge2_4SD Lge3_4SD Lge4_4SD Lge5_4SD Lge6_4SD Lge7_4SD Lge8_4SD Lge9_4SD Lge10_4SD
Lge11_4SD Lge12_4SD Lge13_4SD Lge14_4SD Lge15_4SD Lge16_4SD Lge_mass_4SD Lge_pct_4SD
Lge1_5SD Lge2_5SD Lge3_5SD Lge4_5SD Lge5_5SD Lge6_5SD Lge7_5SD Lge8_5SD Lge9_5SD Lge10_5SD
Lge11_5SD Lge12_5SD Lge13_5SD Lge14_5SD Lge15_5SD Lge16_5SD Lge_mass_5SD Lge_pct_5SD
Lge1_6SD Lge2_6SD Lge3_6SD Lge4_6SD Lge5_6SD Lge6_6SD Lge7_6SD Lge8_6SD Lge9_6SD Lge10_6SD
Lge11_6SD Lge12_6SD Lge13_6SD Lge14_6SD Lge15_6SD Lge16_6SD Lge_mass_6SD Lge_pct_6SD
wt1 wt2 wt3 wt4 wt5 wt6 wt7 wt8 wt9 wt10 wt11 wt12 wt13 wt14 wt15 wt16 wt_max
wt1_max wt2_max wt3_max wt4_max wt5_max wt6_max wt7_max wt8_max wt9_max wt10_max wt11_max wt12_max wt13_max wt14_max wt15_max wt16_max
T1pre1 T1pre2 T1pre3 T1pre4 T1pre5 T1pre6 T1pre7 T1pre8 T1pre9 T1pre10 T1pre11 T1pre12 T1pre13 T1pre14 T1pre15 T1pre16
ECVF1 ECVF2 ECVF3 ECVF4 ECVF5 ECVF6 ECVF7 ECVF8 ECVF9 ECVF10 ECVF11 ECVF12 ECVF13 ECVF14 ECVF15 ECVF16 ECVF_global
Tau1 Tau2 Tau3 Tau4 Tau5 Tau6 Tau7 Tau8 Tau9 Tau10 Tau11 Tau12 Tau13 Tau14 Tau15 Tau16 Tau_global
Rv_mass Rv_massi rvedv rvedvi rvesv rvesvi rvsv rvsvi rvef
length4cham_sys length4cham_pre length4cham_post length3cham_sys length3cham_pre length3cham_post length2cham_sys length2cham_pre length2cham_post
width4cham_sys width4cham_pre width4cham_post width3cham_sys width3cham_pre width3cham_post width2cham_sys width2cham_pre width2cham_post
area4cham_sys area4cham_pre area4cham_post area3cham_sys area3cham_pre area3cham_post area2cham_sys area2cham_pre area2cham_post
special_note
reservoiramt contractileamt totalamt reservoirpct contractilepct totalpct
lav_max lav_min lav_maxi lav_mini lav_max_ht lav_min_ht
lvesv_ht lvedv_ht lvsv_ht co_ht lv_mass_ht
mcf
ec_mass ec_massi ec_mass_ht
ECVFi ECVF_ht
mcf2
lvrv_mass lvrv_massi lvrv_mass_ht
;
/* generate data */
array a_num _numeric_;
array more_num{10000} 8 (10000*1);
do row=1 to 10**3;
do i=1 to dim(a_num);
a_num[i]=rand('integer',-1000000,1000000);
end;
output;
end;
run;
proc sort data=myk007_20241105_Final;
by subject_id visit_name;
run;
proc means n nmiss mean min max data=MYK007_20241105_final;
var _numeric_;
run;
Can you explain why you are attempting to RETAIN a bunch of variables that you are not manipulating in any way?
RETAIN is used to keep the value of a variable across data step boundaries. If the retained variable is one in a data set on the Set statement then each observation read from the data set resets the retained value so is a pretty useless thing to do.
By any chance did you mean to KEEP (or DROP) variables, which is used to subset the variables in a data set?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.