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 (December 2002, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 31 Dec 2002 12:41:41 -0500
Reply-To:     diskin.dennis@KENDLE.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         diskin.dennis@KENDLE.COM
Subject:      Re: Error with call system command:
Comments: To: SUBSCRIBE SAS-L surendra <surendranath.gujjala@INGENIX.COM>
Content-type: text/plain; charset=us-ascii

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;


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