0
votes

I have this weird situation.

I use this data step to run macros:

 data _null_;
        set all_include_Stornos ;

        IF TREATMENT_IND in (4) AND DDS_ROW_IND NE 1  THEN DO;

            CALL EXECUTE ('%HAKPAA ('||POLICY_RK||','||POLICY_VERSION||');');
            call execute ('%UPDATE(HAKPAA_CUMULATE);');


        END;

run;

First macro I call (%HAKPAA) runs pretty good. The other macro (%UPDATE) , doesn't seem to run at all. When I run it manually , not inside the data Null, just call it - it works fine.

I tried to call it from the first macro too (%HAKPAA) but still - the program doesn't get to it.

Does anybody knows why?

1
It's difficult to say exactly what might be going on without knowing what %HAKPAA and %UPDATE are supposed to be doing. Is HAKPAA_CUMULATE the name of a variable in the dataset all_include_Stornos that you're trying to use as a positional parameter for %UPDATE? - user667489
What does "runs pretty good" and "doesn't seem to run at all" mean? It either runs or it does not; without seeing a log file or the macro definition, it is impossible to answer. Try running with options mprint macrogen symbolgen; to get some details in the log. - BellevueBob
Also, if those two parameters are SAS character variables, might they contain special characters (like commas or percent signs)? And if numeric, might the default format contain a comma? - BellevueBob
Thank you for answering. "runs pretty good" means when I manually run the content of the macro, I get the expected results. When I run the whole flow, the program doesn't enter to the macro at all, BUT what I did notice is, the macro does run if I ckick the Play button the second time. Meanning, for some reason on the first execute program doesn't enter the macro. The second execute do enter it. I am rinning it with "options mprint macrogen symbolgen" and therfore can tell you program doesn't even call the macro. I just wonder why.... - user2518751
It's not possible to answer this question without showing what those two macros do. Try to create a short example pair of macros that duplicate the functionality you are experiencing and post them here. - Joe

1 Answers

0
votes

OK guys, I found the problem.

The macro refused to run because I used the Exist function. The Exist function couldn't find the table's name on Metadata, as it has not been created yet.

I removed that function and my program runs perfectly!

Thanks everyone for trying to help me with it!