[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: Error with call system command:
From:       diskin.dennis () KENDLE ! COM
Date:       2002-12-31 17:41:41
[Download RAW message or body]

Surendra,

You don't have to break the statement up at any particular point. SAS will
stick all the pieces together bbefore passing it to the system.
I only broke them up as I did to show that it might make the code more
readable.

You could also put the parts into SAS variables and then concatenate the
variables in the Call System argument.

Regards,
Dennis Diskin




From:  SUBSCRIBE SAS-L surendra <surendranath.gujjala@INGENIX.COM>
       @LISTSERV.UGA.EDU> on 12/31/2002 12:14 PM

Please respond to SUBSCRIBE SAS-L surendra
       <surendranath.gujjala@INGENIX.COM>

Sent by:    "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>


To:    SAS-L@LISTSERV.UGA.EDU
cc:

Subject:    Re: Error with call system command:


I Understand what you are mentioning here.
The example I mentioned here is a simple one. Sometimes, depending on the
number of variables, it may not be possible to use || or divide one
statement to multi statements.

To work around this, I'm making use of separte shell program and calling
this shell in my sas program.

But I don't want to create a separate shell. I'm looking at other
possibilities of sas features to optimize the code like sas options,
creation of variables etc...

Thanks for the suggestions
surendra




On Tue, 31 Dec 2002 10:02:33 -0500, diskin.dennis@KENDLE.COM wrote:

>As far as I know, there is no way to suppress this message, but you can
use
>a simple work around of just concatenating 2 or more shorter strings in
the
>Call System argument:
>call system ("export INF=&envi/clients/&client/raw/&filein; print John
Your input file ${INF} ;" ||
>             "export
OUTF=&envi/clients/&client/temp/sortout&jobstreamID ;" ||
>             "syncsort <<endofsort\n /infile  $INF 160 /outfile $OUTF 160
OVERWRITE /FIELDS wholerec 1 char160 /keys wholerec\n endofsort");
>
>In fact, this might make it more readable/
>
>HTH,
>Dennis Diskin
>
>
>
>
>From:  SUBSCRIBE SAS-L surendra <surendranath.gujjala@INGENIX.COM>
>       @LISTSERV.UGA.EDU> on 12/31/2002 09:41 AM
>
>Please respond to SUBSCRIBE SAS-L surendra
>       <surendranath.gujjala@INGENIX.COM>
>
>Sent by:    "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
>
>
>To:    SAS-L@LISTSERV.UGA.EDU
>cc:
>
>Subject:    Re: Error with call system command:
>
>
>Here is the code for which I'm getting error
>
>
>data _null_;
>call system ("export INF=&envi/clients/&client/raw/&filein; print John
Your
>input file ${INF} ;export
>OUTF=&envi/clients/&client/temp/sortout&jobstreamID ; syncsort <<endofsort
>\n /infile  $INF 160 /outfile $OUTF 160 OVERWRITE /FIELDS wholerec 1 char
>160 /keys wholerec
>\n endofsort");
>run;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic