Hi,
I'm writing a macro that needs to use various different random seeds for different invocations of a subroutine, but I only want to enter one as an argument in the main macro.
I have some code, but I'm not sure if it's working.
Here's what the code looks like:
Is this the right way to do something like this, and if so, is there an output statement to make sure that the seed variable is changing when I want it to?
Thanks!
Jane
I'm writing a macro that needs to use various different random seeds for different invocations of a subroutine, but I only want to enter one as an argument in the main macro.
I have some code, but I'm not sure if it's working.
Here's what the code looks like:
Code:
%macro test1(seed);
%macro test2;
%some_macro(&seed);
%let seed =%eval(&seed+2);
*update random seed to new value for use in next invocation of "test2";
%mend test2;
%test2;
%test2;
%mend test2;
%test1(111);
*this should run "some_macro" with 111 and 113 as seeds;
Is this the right way to do something like this, and if so, is there an output statement to make sure that the seed variable is changing when I want it to?
Thanks!
Jane