COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### rsubmit in macro

• Email
• Follow

First some background.  I'm using SAS Enterprise Guide 4.1 (EG) with
SAS 9.1.  In the setup I have here, when I submit a job, I can either
wrap the code in rsubmit and endrsubmit and have it "load balanced"
across one of three severs, or I can leave the rsubmit off and
everything will run on the main server.

Now I know in EG there is a way to set up "Before and After" code
options so that the rsubmit stuff is automatically added to my code
every time I run a job.  However, I like to be able to control whether
my jobs are synchronous or asynchronous and changing the "Before and
After" options affects all my code at once.

What I currently do is add the following code at the beginning of each
of my pieces of code:

What I want to do is put this in a macro with the values for wait= and
persist= as variables and then place the macro in one of our common
directories so that all I have to do is put something like
%rsub(yes,no) at the top of my code.

I've had trouble, however, getting the rsubmit to take from macro.
Has anyone else attempted something like this and gotten it to work?
Is it possible to get rsubmit to work from a macro like that?  If not,
is there another way that anyone can think of that will let me put the
rsubmit in my code using a one liner like %rsub?

Thanks!!!

Jonathan Taylor

 0

See related articles to this posting

0 Replies
595 Views

Similar Articles

12/7/2013 7:23:01 PM
page loaded in 116304 ms. (0)

Similar Artilces:

Exit macro
How do I exit a macro prematurely? Is there a statement like "return;" (c++,java,c#) or "Exit Sub" (VB) equivalent for SAS macro compiler? On Fri, 27 Jul 2007 10:35:27 -0700, abose <hirak99@GMAIL.COM> wrote: >How do I exit a macro prematurely? Is there a statement like >"return;" (c++,java,c#) or "Exit Sub" (VB) equivalent for SAS macro >compiler? Hi, abose, The %return statement, of course :-), let you exit from the currently running macro. Cheers, Chang On 27 Jul, 19:35, abose <hira...@gmail.com> wrote: > How do I exit a macro prematurely? Is there a statement like > "return;" (c++,java,c#) or "Exit Sub" (VB) equivalent for SAS macro > compiler? What I do in my macros is use "%goto error;" and that puts out a message saying what macro is ending when it jumps to the "error:" label. See the end of the following macro. http://www.datasavantconsulting.com/roland/spectre/macros/closerep.sas

Macro Not resovling
I do not understand why this macro is not resolving when n=1. Csn someone tell me. %do n=1 %to 4; %if &n=1 %then %do; %if &&m&i=0009 %then %let excludenew =(where=(type ne 'NEW')); %else %if &&m&i=0010 %then %let excludenew =(where=(type ne 'NEW')); %else %if &&m&i=0011 %then %let excludenew =(where=(type ne 'NEW')); %else %if &&m&i=0012 %then %let excludenew =(where=(type ne 'NEW')); %else %if &&m&i=0101 %then %let excludenew =(where=(type ne 'NEW')); %end; %else %let excludenew= ;

MACRO QUERY
# include<stdio.h> #define NEG(a) -a void main() { int x=1; printf("%d",--1); //statement-1--This is compile time error. printf("%d",-NEG(x)); //statement-2--It works and prints out 1 } In statement-1 expectedly I am getting a compile time error as it is trying to apply a decrement on a constant. but in statement-2, I am not getting compiled error and gets result as 1. I thought macro would expand as --1 and give an error. Why is this anomaly in second statement? On Jan 5, 10:21=A0am, Tagore <c.lang.mys...@gmail.com> wrote: >...; 1. > I thought macro would expand as --1 and give an error. > Why is this anomaly in second statement? -NEG(x) expands to --x, not --1. Tagore <c.lang.myself@gmail.com> writes: > # include<stdio.h> > > #define NEG(a) -a A better way to write this would be: #define NEG(a) (-(a)) But of course you're asking about potential problems caused by the definition without parentheses. > void main() This should be int main(void) And since you're calling printf, you need #include <stdio.h> > { > int x=1; > > printf("

stuck with macro
) # s > > #define XStr(x, y) str(x) ## str(y) > > int > main(void) > { > puts(XStr(A, x)); > return 0; > } > > #gcc -ansi -pedantic -W -Wall new.c && ./a.out > new.c:10:1: error: pasting ")" > and "str" does not give a valid preprocessing token Sorry about that. In case you may also want to stringize a macro value: /* BEGIN new.c */ #include <stdio.h> #define XStr(a, b) #a #b #define x 5 #define str(s) # s #define MStr(a, b) str(a) str(b) int main(void

The TEST_() macro
Newsgroupies: This sample code tests a WTL dialog box. (Fear not, topic police, we see little Windows Template Library code here, and the actual TEST_() macro itself is quite portable.) I like the TEST_() macro better than the usual Test Suite system (where you must write extra code to push each Test Case into its Suite's list), so I wrote a CppUnit clone that uses _only_ the TEST_() macro. Firstly, all TestCases obey the Abstract Template pattern: class TestCase { public: virtual void setUp() {} virtual void runCase() = 0; virtual void..._(suite, target) \ struct suite##target: public suite \ { void runCase(); } \ a##suite##target; \ void suite##target::runCase() TEST_(TestDialog, first_name) { CPPUNIT_ASSERT_EQUAL( "Ignatz", m_aDlg.getText(IDC_EDIT_FIRST_NAME) ); } TEST_(TestDialog, last_name) { CPPUNIT_ASSERT_EQUAL( "Mouse", m_aDlg.getText(IDC_EDIT_LAST_NAME) ); } The object instances went inside the TEST_() macro, which uses token##pasting to give them unique

Macro parameters
Multiple macro parameters can be nested inside brackets, for example \def\breftwo[#1,#2]{[\expandargcond{#1},\expandargcond{#2}]} together with \def\expandargcond#1{% {\expandafter}\expandafter\ifx\csname #1\endcsname\@undefined{\rm?}% \else\csname #1\endcsname\fi} (catcode changes for @ omitted) works fine for a 2-citation: \def\aaa{31} \def\bbb{45} \breftwo[aaa,bbb] expands to [31,45] while \breftwo[aaa,BBB] expands to [31,?] Question: can a user-defined TeX macro be written to receive a variable number of arguments in a list? I was thinking of a \bref macro that can be called with 1 to 9 arguments, counts the arguments supplied inside [ ] and emits appropriate tokens. If zero arguments, emit []. Examples: \bref[aaa,bbb,ccc,bbb,aaa] -> [31,45,?,45,31] \bref[ccc] -> [?] \bref[] -> [] On Thu, 16 Nov 2006, carlos@colorado.edu wrote: > Multiple macro parameters can be nested inside brackets, for example > > \def\breftwo[#1,#2]{[\expandargcond{#1},\expandargcond{#2}]} > > together with > > \def\expandargcond#1{% > {\expandafter}\expandafter\ifx\csname #1\endcsname

to iterate a macro
Hi, I have a macro %iterate. with no return value. How do I execute this macro 100 times? I tried something like: data one; do i=1 to 100; %iterate; end; run; but its giving an error saying that a do loop is open. Thanks, Mayukh Mayukh, =20 It depends one what your macro definition actual has in it to how you = can call it. =20 if your macro has open SAS code and is constructed correctly then your = method would work. However, it coyld be the case that it needs to be = called thusly,=20 =20 %macro loop; %do i =3D 1 to 100; %iteterate; %end; %mend; =20 In short show us teh macro definition for %iterate and tell us what you = are trying to do with it. Perhaps your on ethe righ track or perhaps we = could show you another way that is easier or more readable and = maintainable. =20 =20 Toby=20 ________________________________ From: SAS(r) Discussion on behalf of Mayukh Dass Sent: Thu 12/16/2004 10:06 PM To: SAS-L@LISTSERV.UGA.EDU Subject: to iterate a macro Hi, I have a macro %iterate. with no return value. How do I execute this macro 100 times? I tried something like: data one; do i=3D1 to 100; %iterate; end; run; but its giving an error saying

CALMAR2 Macro
Does anyone have a copy of the documentation (in English) for the Calmar2 macro? I am interested in understanding the mathematical underpinnings of the theory behind this calibration method. Thanks. Seema. Seema, Take a look at: http://xrl.us/rihf It's not an English version user's guide, but may be able to answer your questions. HTH, Art ----------- On Thu, 31 Aug 2006 09:31:54 -0700, svs <seema.var@GMAIL.COM> wrote: >Does anyone have a copy of the documentation (in English) for the >Calmar2 macro? I am interested in understanding the mathematical >underpinnings of the theory behind this calibration method. >Thanks. >Seema. art297@NETSCAPE.NET replied: >On Thu, 31 Aug 2006 09:31:54 -0700, svs <seema.var@GMAIL.COM> wrote: > > >Does anyone have a copy of the documentation (in English) for the > >Calmar2 macro? I am interested in understanding the mathematical > >underpinnings of the theory behind this calibration method. > >Thanks. > >Seema. >Seema, > >Take a look at: http://xrl.us/rihf >It's not an English version user's guide, but may be able to answer your >questions. >

\unique macro?
I've searched for this on google, but to no avail: Is there a package that provides a \unique macro, where by a \unique macro I mean something that returns a unique list of its arguments? E.g. \unique{hello, goodbye, hello} would expand to hello, goodbye It would expand its arguments before doing the uniqueness comparison. E.g. \def\watcha{hello} \def\tata{goodbye} \def\seeya{goodbye} would expand to hello, goodbye Any pointers gratefully received, David. David C Sterratt <david.c.sterratt@ed.ac.uk> wrote: > I've searched for this on google, but to no avail: > > Is there a package that provides a \unique macro, where by a \unique > macro I mean something that returns a unique list of its arguments? > E.g. > > \unique{hello, goodbye, hello} > > would expand to > > hello, goodbye > > It would expand its arguments before doing the uniqueness > comparison. E.g. > > \def\watcha{hello} > \def\tata{goodbye} > \def\seeya{goodbye} > > would expand to > > hello, goodbye \documentclass{article} \usepackage{keyval} \makeatletter \newcommand*{\unique}[1]{% \global\let\unique@list\@empty

Macro woes
*sigh* I wasn't expecting to create another thread so quickly :) Can someone explain to me what the difference here is, and why I get the results that I do: (defmacro test (x) (functionp ,x)) (test #'+) => T --------------------- (defmacro test (x) ,(functionp x)) (test #'+) => NIL My mind tells me that there should be no difference between the two of these situations, but evidently there is. In case it matters, I'm using Corman Lisp 2.5. Desparately seeking enlightenment :) Jeff "Jeff" <jma@insightbb.com> writes: > My mind tells me that there should be no difference between the two of > these situations, but evidently there is. In case it matters, I'm using > Corman Lisp 2.5. marcoexpand is your friend. CL-USER> (defmacro test (x) (functionp ,x)) TEST CL-USER> (macroexpand '(test #'+)) (FUNCTIONP #'+) T CL-USER> (defmacro test (x) ,(functionp x)) TEST CL-USER> (macroexpand '(test #'+)) NIL T the second macro is calling functionp on the form (function +) and expanding into that. a list is not a function. so your second macro always expands into NIL. evaling NIL returns NIL