I have another issue since yesterday and i don't have so much time to learn correctly as it's for work (and have no formation on this langage basis) My code below : %macro inter(start, end);
%do i=%sysevalf(&start) %to %sysevalf(&end) %by %eval(30*60);
PROC SQL
CREATE TABLE WORK.T1
---
QUIT;
PROC SQL
CREATE TABLE WORK.T2
---
QUIT;
%if &i eq 0 %then
%do;
PROC SQL;
CREATE TABLE WORK.T3 as
SELECT a.BD, a.SDEB, a.SCRED, a.TYPE, a.STATUS,
(CASE WHEN b.SETT = . THEN a.SETT
ELSE a.SETT-b.SETT END) As SETT FORMAT=EUROX20.2, a.REMAIN FORMAT=EUROX20.2, a.NB, put(&i,time.) as TS
FROM WORK.T1 A
LEFT JOIN WORK.T2 B on (a.BD=b.BD and a.type=b.type and a.status=b.status);
QUIT;
%end;
%else
%do;
PROC SQL;
INSERT INTO TABLE WORK.T3
SELECT a.BD, a.SDEB, a.SCRED, a.TYPE, a.STATUS,
(CASE WHEN b.SETT = . THEN a.SETT
ELSE a.SETT-b.SETT END) FORMAT=EUROX20.2, a.REMAIN FORMAT=EUROX20.2, a.NB, put(&i,time.)
FROM WORK.T1 A
LEFT JOIN WORK.T2 B on (a.BD=b.BD and a.type=b.type and a.status=b.status);
QUIT;
%end;
%end;
%mend;
%inter(start="00:00:00"t, end="01:00:00"t); Create Table work fine but i can't succeed to insert following data =( And the log below : NOTE: Line generated by the invoked macro "INTER".
176 PROC SQL; INSERT INTO TABLE WORK.NTS_GLOBAL_FINAL (BUSINESS_DATE, SYSENTDEB, SYSENTCRED, TYPE, STATUS,SETTLED,
____
79
176 ! REMAINING, NUMBER, TS) SELECT a.BUSINESS_DATE, a.SYSENTDEB, a.SYSENTCRED, a.TYPE, a.STATUS, (CASE WHEN b.SETTLED = .
176 ! THEN a.SETTLED
ERROR 79-322: Expecting a SELECT.
NOTE: Line generated by the invoked macro "INTER".
176 PROC SQL; INSERT INTO TABLE WORK.NTS_GLOBAL_FINAL (BUSINESS_DATE, SYSENTDEB, SYSENTCRED, TYPE, STATUS,SETTLED,
____
202
176 ! REMAINING, NUMBER, TS) SELECT a.BUSINESS_DATE, a.SYSENTDEB, a.SYSENTCRED, a.TYPE, a.STATUS, (CASE WHEN b.SETTLED = .
176 ! THEN a.SETTLED
ERROR 202-322: The option or parameter is not recognized and will be ignored. Thank you for your help. PS: i'll will ask for a formation on SAS
... View more