LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 16 Jun 2007 11:40:46 +0200
Reply-To:     SAS-L List <sas-l@listserv.uga.edu>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robert Bardos <bardos2@ANSYS.CH>
Subject:      Re: Macro text to file
In-Reply-To:  <1181983893.933434.86650@c77g2000hse.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

> abose > Gesendet: Samstag, 16. Juni 2007 10:52 > > Hi, > Is there any foolproof way to output the text generated > by any macro to a file (using data _null_ and put may be)? > > The reason I ask: > > Where I work, it is a mainframe system. I can put JCL > and SAS commands to a special file, to create a new job. > I would like to have some macro which can create new jobs. > Example, I would want to have a macro > %Fork which can create a new job, taking the argument > as a macro which generates SAS code: > > %Macro Process(parameter); > ...whatever the job should do... > %Mend; > > %Fork(%Process(a)) > %Fork(%Process(b)) > %Fork(%Process(c)) > >

Rather vague question. What do you mean by "I can put JCL and SAS commands to a special file, to create a new job"? Manually, by using the ISPF editor? Programmatically, by writing JCL and SAS statements to a dataset/member and submitting that dataset/member manually or by means of a job scheduler? Or programmatically, by writing JCL and SAS statements to a DDname allocated to an internal reader (INTRDR) thereby submitting the generated job without manual intervention?

Let's suppose it's the last thing, i.e. writing to an internal reader. If you do so by means of a data step then there's nothing whatsoever that inhibits you from wrapping that data step in a macro.

Can you give a real example of what you tried and where your attempts failed? Proceeding from there might be easier for those trying to help than doing lots of vain guesswork.

But first things first. First try to build a foolproof data step that submits the generated job via INTRDR. Only then wrap it all up in a macro.

Robert Bardos Ansys AG, Zurich, Switzerland


Back to: Top of message | Previous page | Main SAS-L page