From: Sunny on

Hello Group,

I've a problem while running a .bat file I got the
bunch of errors.
When it open SAS it gives some warning and error
message in DOS cmd prompt.


-CONFIG is not recognized as internal or external command, operable
program or batch file

-sysin is not recognized as internal or external command, operable
program or batch file.


Here is my .bat File


Run.Bat File

"C:\program files\sas\sasfoundation\9.2\sas.exe"

-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG"

-sysin

C:\users\runit\prog1.sas

When it open SAS it gives this message

NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened
instead.
NOTE: All registry changes will be lost at the end of the session.
WARNING: Unable to copy SASUSER registry to WORK registry. Because of
this,
WARNING: you will not see registry customizations during this session.
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
instead.
NOTE: All profile changes will be lost at the end of the session.
NOTE: This SAS session is using a registry in WORK. All changes will
be lost at the end of this
NOTE: session.
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
instead.
NOTE: All profile changes will be lost at the end of the session.

Will appreciate your help.

Thanks

Sunny

From: Ya Huang on
Looks like you broke the long line into several command lines,
if so, yoou need the '^' to connect them:

"C:\program files\sas\sasfoundation\9.2\sas.exe" ^
-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG" ^
-sysin C:\users\runit\prog1.sas

Otherwise, DOS will think there are three command lines.


On Mon, 1 Feb 2010 08:12:40 -0800, Sunny <msunny17(a)GMAIL.COM> wrote:

>Hello Group,
>
> I've a problem while running a .bat file I got the
>bunch of errors.
> When it open SAS it gives some warning and error
>message in DOS cmd prompt.
>
>
>-CONFIG is not recognized as internal or external command, operable
>program or batch file
>
>-sysin is not recognized as internal or external command, operable
>program or batch file.
>
>
>Here is my .bat File
>
>
>Run.Bat File
>
>"C:\program files\sas\sasfoundation\9.2\sas.exe"
>
>-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG"
>
> -sysin
>
>C:\users\runit\prog1.sas
>
>When it open SAS it gives this message
>
>NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened
>instead.
>NOTE: All registry changes will be lost at the end of the session.
>WARNING: Unable to copy SASUSER registry to WORK registry. Because of
>this,
>WARNING: you will not see registry customizations during this session.
>NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
>instead.
>NOTE: All profile changes will be lost at the end of the session.
>NOTE: This SAS session is using a registry in WORK. All changes will
>be lost at the end of this
>NOTE: session.
>NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
>instead.
>NOTE: All profile changes will be lost at the end of the session.
>
> Will appreciate your help.
>
>Thanks
>
>Sunny
From: Gerhard Hellriegel on
where do you see a ERROR??? I see only NOTEs and WARNINGs

That notes are informations about some things which you should know. E.g.
you cannot use SASUSER library, cause that is not allocated for a batch
session.
Other notes tell you, that all profile-changes are gone, because WORK is
temporary (remember, you have no permanent SASUSER).

What does not work in that session? I can't see it.

Gerhard




On Mon, 1 Feb 2010 08:12:40 -0800, Sunny <msunny17(a)GMAIL.COM> wrote:

>Hello Group,
>
> I've a problem while running a .bat file I got the
>bunch of errors.
> When it open SAS it gives some warning and error
>message in DOS cmd prompt.
>
>
>-CONFIG is not recognized as internal or external command, operable
>program or batch file
>
>-sysin is not recognized as internal or external command, operable
>program or batch file.
>
>
>Here is my .bat File
>
>
>Run.Bat File
>
>"C:\program files\sas\sasfoundation\9.2\sas.exe"
>
>-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG"
>
> -sysin
>
>C:\users\runit\prog1.sas
>
>When it open SAS it gives this message
>
>NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened
>instead.
>NOTE: All registry changes will be lost at the end of the session.
>WARNING: Unable to copy SASUSER registry to WORK registry. Because of
>this,
>WARNING: you will not see registry customizations during this session.
>NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
>instead.
>NOTE: All profile changes will be lost at the end of the session.
>NOTE: This SAS session is using a registry in WORK. All changes will
>be lost at the end of this
>NOTE: session.
>NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
>instead.
>NOTE: All profile changes will be lost at the end of the session.
>
> Will appreciate your help.
>
>Thanks
>
>Sunny
From: "Terjeson, Mark" on
Hi Sunny,

In addition to Ya's observation to tell
the .bat file to treat the lines as
continuation lines so that it looks like
one command line to the operating system,
bear in mind that on Windows, if you were
to concatenate all the pieces onto one
line, that the DOS command line has a max
character limit of 251 to 262.

Typically with DOS command line lengths
the maximum is around 262. Depending upon
how many layers through the operating system,
scheduling utilities, number of shells, etc.
the number can vary slightly. Trial and error
testing lets a person know the max for each
scenario. The miminum maximum that I have come
across for 4 layers of expression handling in
a DOS/Windows/network environment is 251. i.e.
some command parsers in the DOS/Windows/network
world actually gobble up the CRLF pair and your
available length is -2 just because of that.
(Go figure...)

One of the easiest and straightforward workarounds
is to shorten path and file names IF you have that
luxury, and if it becomes desideratum.



Hope this is helpful.


Mark Terjeson
Investment Business Intelligence
Investment Management & Research
Russell Investments
253-439-2367


Russell
Global Leaders in Multi-Manager Investing







-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Ya
Huang
Sent: Monday, February 01, 2010 8:35 AM
To: SAS-L(a)LISTSERV.UGA.EDU
Subject: Re: Problem running bat file

Looks like you broke the long line into several command lines,
if so, yoou need the '^' to connect them:

"C:\program files\sas\sasfoundation\9.2\sas.exe" ^
-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG" ^
-sysin C:\users\runit\prog1.sas

Otherwise, DOS will think there are three command lines.


On Mon, 1 Feb 2010 08:12:40 -0800, Sunny <msunny17(a)GMAIL.COM> wrote:

>Hello Group,
>
> I've a problem while running a .bat file I got the
>bunch of errors.
> When it open SAS it gives some warning and error
>message in DOS cmd prompt.
>
>
>-CONFIG is not recognized as internal or external command, operable
>program or batch file
>
>-sysin is not recognized as internal or external command, operable
>program or batch file.
>
>
>Here is my .bat File
>
>
>Run.Bat File
>
>"C:\program files\sas\sasfoundation\9.2\sas.exe"
>
>-CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG"
>
> -sysin
>
>C:\users\runit\prog1.sas
>
>When it open SAS it gives this message
>
>NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened
>instead.
>NOTE: All registry changes will be lost at the end of the session.
>WARNING: Unable to copy SASUSER registry to WORK registry. Because of
>this,
>WARNING: you will not see registry customizations during this session.
>NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
>instead.
>NOTE: All profile changes will be lost at the end of the session.
>NOTE: This SAS session is using a registry in WORK. All changes will
>be lost at the end of this
>NOTE: session.
>NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
>instead.
>NOTE: All profile changes will be lost at the end of the session.
>
> Will appreciate your help.
>
>Thanks
>
>Sunny
From: Frank DiIorio on
On Feb 1, 11:12 am, Sunny <msunn...(a)gmail.com> wrote:
> Hello Group,
>
>                   I've a problem while running a .bat file I got the
> bunch of errors.
>                   When it open SAS it gives  some warning and error
> message in DOS cmd prompt.
>
> -CONFIG is not recognized as internal or external command, operable
> program or batch file
>
> -sysin   is not recognized as internal or external command, operable
> program or batch file.
>
> Here is my .bat File
>
> Run.Bat File
>
> "C:\program files\sas\sasfoundation\9.2\sas.exe"
>
> -CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG"
>
>  -sysin
>
> C:\users\runit\prog1.sas
>
> When it open SAS it gives this message
>
> NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened
> instead.
> NOTE: All registry changes will be lost at the end of the session.
> WARNING: Unable to copy SASUSER registry to WORK registry. Because of
> this,
> WARNING: you will not see registry customizations during this session.
> NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
> instead.
> NOTE: All profile changes will be lost at the end of the session.
> NOTE: This SAS session is using a registry in WORK.  All changes will
> be lost at the end of this
> NOTE: session.
> NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened
> instead.
> NOTE: All profile changes will be lost at the end of the session.
>
>  Will appreciate your help.
>
> Thanks
>
> Sunny

It's hard to tell from the way the original message was formatted,
but ...
If the SAS command, -CONFIG, and -SYSIN were on separate lines, that
could explain the DOS error messages. There should be a single line in
the BAT file, and it should look like (note the use of double quotes):
"[location of SAS exe]" -config "[location of config file]" -
sysin "[location of sysin/sas pgm]"
There **may** be a way to tell DOS that a command is continued onto
the next line.

Those SAS NOTEs are usually created when you're starting SAS and
another SAS session is currently open (e.g., you're running an
interactive session and then run a BAT file that opens **another**
session - SAS is telling you that it can't save any registry-related
changes the second session might try to make).