Hi, @novinosrin, thanks for the quick reply. I'm a bit confused, but that doesn't seem like it would work for any date, only for 2018. The idea would be to output my data to various tabels e.g. ORDERS_201701, PAYMENTS_201701, SALES_201702 , PAYMENTS_201702, ... , SALES_201901, PAYMENTS_201902. My idea would be something like: the routine just got called, then the dates that I'm currently processing would be &have. in the following example. %LET dt_begin_sem = %SYSFUNC(INTNX(semiyear,&have.,0,b));
%LET dt_end_sem = %SYSFUNC(INTNX(semiyear,&have.,0,e));
Then, whenever a row had its date between the beginning and end of semester, it would be included in the table being currently generated. So table ORDERS_201701 would have everything from 01JAN2017 to 30JUN2017. Another option would be a function that outputted semesters, but I haven't found anything like that.... Comparing the desired function "SMTR" to the existing function "QTR", it would be something like: QTR(15JAN2017) = 1
QTR(20SEP2017) = 3
SMTR(15JAN2017) = 1
SMTR(20SEP2017) = 2 I hope I managed to make myself clear, english is not my first language. Thanks again.
... View more