|Date: ||Sat, 16 Jun 2007 11:40:46 +0200|
|Reply-To: ||SAS-L List <firstname.lastname@example.org>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Robert Bardos <bardos2@ANSYS.CH>|
|Subject: ||Re: Macro text to file|
|Content-Type: ||text/plain; charset="iso-8859-1"|
> Gesendet: Samstag, 16. Juni 2007 10:52
> 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...
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
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.
Ansys AG, Zurich, Switzerland