Date: Tue, 29 Apr 1997 08:34:05 PDT
Reply-To: Howard Wright <hwright@OLDMUTUAL.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Howard Wright <hwright@OLDMUTUAL.COM>
Subject: Re: SAS Base Syntax check in AF application
In-Reply-To: <9704281000.AA2490@NYC-NTGW-N02.ny.jpmorgan.com>
Content-Type: text/plain; charset="ISO-8859-1"; X-MAPIextension=".TXT"
Hi,
Try using the obs=0 and noreplace system options and then pickup the SYSRC
macro variable after the datastep or proc has run;
e.g.
options obs=0;
options noreplace;
data out;
set temp;
if=&userif;
run;
You can pick up the SYSRC macro variable in AF with the following code:
rc=symget('SYSRC');
The obs=0 option specifies that 0 observarions are read in from the input
dataset.
NOREPLACE tells SAS not to overwite an existing SAS dataset with one of the
same name. If you are creating a new datastet, it will be created wath all
the variables,
but with 0 observations.
I havn't tested this, but it should work.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Howard Wright + InfoActive CC +
+ SAS Consultant + A SAS Institute Quality +
+ Cape Town + On assignment at Old Mutual +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ InfoActive (021) 683-6448 hwright@aztec.co.za +
+ Old Mutual (021) 509-4118 hwright@oldmutual.com +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ There is no relationship whatsoever between the above +
+ views and those of Old Mutual. +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
----------
> Hi everybody,
>
> I'm developing a SAS AF application where the user can, in free mode,
enter
> parts of SAS statements (like IF clause). Those parts of SAS statements
will
> be included in SAS Base programs. I would like to check the syntax of
what
> the
> user write before saving and using it.
>
> Does anybody have an idea how I can perform this syntax check ?
>
>
> Ivan SON
> LACO Information Services NV
> Zaventem (BELGIUM)