PC Review


Reply
Thread Tools Rate Thread

Different errorlevel win2003 & win2k-ts

 
 
Christopher Aide
Guest
Posts: n/a
 
      21st Aug 2007


Hi all,

we are running a couple of batch files, that start cobol-programs (cobol
= an old programing language). If the cobol program has a problem, it
stops (closing the cobol window) and presents "errorlevel 1" or
"errorlevel 255" to the batch file. The batch file then takes
appropriate actions.
If the program runs through without error, „errorlevel 0“ is presented
to the batch file, ... all just as it should be!!

Now our problem:
When running the same batch-file on our Win2k-TerminalServer, the return
value of the very same cobol-program is always „errorlevel 0“, even if
the cobol program had to exit because of an error!! This of course
results in our batch files not working correctly!

It would be nice to hear your thoughts on this subject!

Thanks in advance

Chris
 
Reply With Quote
 
 
 
 
foxidrive
Guest
Posts: n/a
 
      21st Aug 2007
On Tue, 21 Aug 2007 12:33:51 +0200, Christopher Aide
<(E-Mail Removed)> wrote:

>we are running a couple of batch files, that start cobol-programs (cobol
>= an old programing language). If the cobol program has a problem, it
>stops (closing the cobol window) and presents "errorlevel 1" or
>"errorlevel 255" to the batch file. The batch file then takes
>appropriate actions.
> If the program runs through without error, „errorlevel 0“ is presented
>to the batch file, ... all just as it should be!!
>
>Now our problem:
>When running the same batch-file on our Win2k-TerminalServer, the return
>value of the very same cobol-program is always „errorlevel 0“, even if
>the cobol program had to exit because of an error!! This of course
>results in our batch files not working correctly!
>
>It would be nice to hear your thoughts on this subject!
>
>Thanks in advance


Different OS use different ways of setting 'stuff'
We'd need to see the code in question...

 
Reply With Quote
 
Chris Aide
Guest
Posts: n/a
 
      21st Aug 2007
foxidrive schrieb:
> On Tue, 21 Aug 2007 12:33:51 +0200, Christopher Aide
> <(E-Mail Removed)> wrote:
>
>> we are running a couple of batch files, that start cobol-programs (cobol
>> = an old programing language). If the cobol program has a problem, it
>> stops (closing the cobol window) and presents "errorlevel 1" or
>> "errorlevel 255" to the batch file. The batch file then takes
>> appropriate actions.
>> If the program runs through without error, „errorlevel 0“ is presented
>> to the batch file, ... all just as it should be!!
>>
>> Now our problem:
>> When running the same batch-file on our Win2k-TerminalServer, the return
>> value of the very same cobol-program is always „errorlevel 0“, even if
>> the cobol program had to exit because of an error!! This of course
>> results in our batch files not working correctly!
>>
>> It would be nice to hear your thoughts on this subject!
>>
>> Thanks in advance

>
> Different OS use different ways of setting 'stuff'
> We'd need to see the code in question...
>


Hi foxidrive,

thanks for answering. Would it perhaps be possible, to copy cmd.exe from
our Win2003-Server to the Win200-TS-Server, would that work?

Or: is there any other cmd.exe/dos -version I could download and install
on our TS-Server in hopes that that new version might start presenting
errorlevels again?

TIA

Chris
 
Reply With Quote
 
foxidrive
Guest
Posts: n/a
 
      21st Aug 2007
On Tue, 21 Aug 2007 21:09:43 +0200, Chris Aide <(E-Mail Removed)>
wrote:

>foxidrive schrieb:
>> On Tue, 21 Aug 2007 12:33:51 +0200, Christopher Aide
>> <(E-Mail Removed)> wrote:
>>
>>> we are running a couple of batch files, that start cobol-programs (cobol
>>> = an old programing language). If the cobol program has a problem, it
>>> stops (closing the cobol window) and presents "errorlevel 1" or
>>> "errorlevel 255" to the batch file. The batch file then takes
>>> appropriate actions.
>>> If the program runs through without error, „errorlevel 0“ is presented
>>> to the batch file, ... all just as it should be!!
>>>
>>> Now our problem:
>>> When running the same batch-file on our Win2k-TerminalServer, the return
>>> value of the very same cobol-program is always „errorlevel 0“, even if
>>> the cobol program had to exit because of an error!! This of course
>>> results in our batch files not working correctly!
>>>
>>> It would be nice to hear your thoughts on this subject!
>>>
>>> Thanks in advance

>>
>> Different OS use different ways of setting 'stuff'
>> We'd need to see the code in question...
>>

>
>Hi foxidrive,
>
>thanks for answering. Would it perhaps be possible, to copy cmd.exe from
>our Win2003-Server to the Win200-TS-Server, would that work?
>
>Or: is there any other cmd.exe/dos -version I could download and install
>on our TS-Server in hopes that that new version might start presenting
>errorlevels again?


Actually I assumed it was a prior OS - I didn't cotton to the fact that you
were using W2003 ok and it didn't work in W2K.

You can try using the cmd.exe from W2003, it shouldn't hurt. Dunno if
it'll do any good though as it may be a problem with missing external
command instead.

Seeing the code is the way to tell why it fails...

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
errorlevel not set in for loop - delayed expansion !errorlevel! used ghquick Microsoft Windows 2000 CMD Promt 3 7th Jul 2006 05:25 PM
question about win2k and win2003 djtony Microsoft Windows 2000 Deployment 1 1st Aug 2005 06:24 PM
How to update win2k to win2003 jack Microsoft Windows 2000 Active Directory 1 27th Dec 2004 04:00 AM
NT4/Win2K ----> Win2003 Microsoft Windows 2000 Deployment 0 12th Dec 2003 10:30 PM
Re: Win2K AD migrating to Win2003 Matjaz Ladava [MVP] Microsoft Windows 2000 Active Directory 1 10th Jul 2003 06:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:04 PM.