Hello,
can some one help me to resolve sort execution failure while am doing left join .
PROC SQL;
CREATE TABLE MW_ORG_INFO1 AS
SELECT DISTINCT A.ITEMNO
,A.ORGCD
FROM
TDMH2K.MAMM_PART_CHANGE_TRACKER A
WHERE A.GNO_FACILITY_CODE='92'
AND A.CHANGE_DATE =
(
SELECT MAX(B.CHANGE_DATE)
FROM TDMH2K.MAMM_PART_CHANGE_TRACKER B
WHERE A.ITEMNO=B.ITEMNO
AND A.GNO_FACILITY_CODE=B.GNO_FACILITY_CODE
AND B.ORGCD NE ' '
)
ORDER BY ITEMNO;
QUIT;
RUN;
PROC SORT DATA=MW_ORG_INFO1 NODUPKEY; BY ITEMNO; RUN;
/**** Added on 25 April 2024 *****/
DATA GLB_LC_ITM (RENAME=(LC_ITM_TYP =ORG_CD ));
SET PR01GI.GLB_LC_ITM ;
length NODE $3.;
length ACSD $3.;
FAC_CD=SUBSTR(LOG_CTR_CD,3) ;
DROP LOG_CTR_CD;
If LC_ITM_TYP IN('BPP','KIT','NJORG','OAD','SPP','WPC') then NODE='NO';
Else NODE='YES';
IF LC_ITM_TYP IN('BPP','KIT','NJORG','OAD','SPP','WPC','CMD','LWL','MTH','MWL','PWR')
THEN ACSD='NO' ;
ELSE ACSD='YES';
RUN;
/**** Added on 25 April 2024 *****/
PROC SQL;
CREATE TABLE MW_ORG_INFO2 AS
SELECT A.*
,B.FAC_CD
,B.NODE
,B.ACSD
FROM MW_ORG_INFO1 AS A LEFT JOIN GLB_LC_ITM AS B ON A.ORGCD=B.ORG_CD
ORDER BY A.ITEMNO;
QUIT;
RUN;
am getting error in the last step. while doing left join.
dataset A is having around 75k records and dataset B has 308K records.
ERROR: SORT EXECUTION FAILURE.
Have a look at the Troubleshooting "Sort initialization failure" and "Sort execution failure" errors in Windows and UNI... for some suggestions on how to troubleshoot and fix this problem.
Have a look at the Troubleshooting "Sort initialization failure" and "Sort execution failure" errors in Windows and UNI... for some suggestions on how to troubleshoot and fix this problem.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.