Hi All, We are migrating the SAS programs from 9.3 to viya. When we run the below macro code the office hours are created as expected IN 9.3, but in 9.4 the output was different. Not sure what to update on 9.4 to get the same results as in 9.3. %macro time(day,when,table); data hours1a; set &table; format time1 timeampm8. time2 $8. &day.&when.a $7.; time1=&day.&when; time2=put(time1,timeampm8.); if time2='12:00 AM' then time2='00:00 PM'; hr=kscan(time2,1,':'); l=length(ktrim(kleft(hr))); if l=1 then time2='0'||ktrim(kleft(time2)); &day.&when.a=kcompress(time2,''); drop time1 time2 l hr; run; %mend time; %time(su,beg1,anc1); %time(su,end1,hours1a); %time(mo,beg1,hours1a); %time(mo,end1,hours1a); %time(tu,beg1,hours1a); %time(tu,end1,hours1a); %time(we,beg1,hours1a); %time(we,end1,hours1a); %time(th,beg1,hours1a); %time(th,end1,hours1a); %time(fr,beg1,hours1a); %time(fr,end1,hours1a); %time(sa,beg1,hours1a); %time(sa,end1,hours1a); data hours2a; set hours1a; format sunday1 monday1 tuesday1 wednesday1 thursday1 friday1 saturday1 $50.; sunday1=subeg1a||'-'||suend1a||'00:00PM-00:00PM 00:00PM-00:00PM'; monday1=mobeg1a||'-'||moend1a||'00:00PM-00:00PM 00:00PM-00:00PM'; tuesday1=tubeg1a||'-'||tuend1a||'00:00PM-00:00PM 00:00PM-00:00PM'; wednesday1=webeg1a||'-'||weend1a||'00:00PM-00:00PM 00:00PM-00:00PM'; thursday1=thbeg1a||'-'||thend1a||'00:00PM-00:00PM 00:00PM-00:00PM'; friday1=frbeg1a||'-'||frend1a||'00:00PM-00:00PM 00:00PM-00:00PM'; saturday1=sabeg1a||'-'||saend1a||'00:00PM-00:00PM 00:00PM-00:00PM'; keep provno sunday1 monday1 tuesday1 wednesday1 thursday1 friday1 saturday1; run; output: 9.3 output9.4 Thanks .
... View more