Re: The system cannot find the batch label specified
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Fri, 23 Jan 2009 21:25:34 +0100
"Vizoere" <Vizoere@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6BF15932-5167-476A-852B-C1D2BE80E945@xxxxxxxxxxxxxxxx
Hi all -- Hoping someone else has seen this particular issue.
"The system cannot find the batch label specified - RunReports"
I've written quite an extensive shell script that uses multiple "call
:asdf"
type subroutine management. Everything works great until I get to a
particular section of the script. When calling the :RunReports label, I
get
the above error.
I've done quite a bit of searching and have verified that my line endings
are [CR][LF] rather than just [LF]. I also tried adding 10 more blank
lines
in front of the offending label just to make sure it was not crossing
between
two 512 byte blocks.
I took everything out of the script except the call command and the label
itself and the error goes away so it seems that there are no weird hidden
characters on the line.
I wrote the entire script from scratch on a Windows XP SP2 machine using
Notepad2.exe from www.flos-freeware.ch. I copy it using Windows Explorer
to
a shared network drive. Another admin copies it to her C: drive using
Windows Explorer, then copies it to a server inside of Terminal Services
from
her C: drive, again using Windows Explorer. To eliminate at least some
problems that might possibly be caused by that program, I copied the
entire
script into Windows Notepad and resaved. The problem persists.
As a workaround, I took the code in the particular section out and saved
it
in its own .cmd file and changed the call command to, "call
RunReports.cmd"
This is the way the script is currently running but it bothers me that I
have
this problem.
I'm willing to post the script if it would be useful, though it is quite
long (420 lines). Part of it is pasted below.
Thanks for any thoughts you may have,
Jeremy C.
REM Step 7 - Kick off Report job.
call :Log SUBSTART STARTING :RunReports SUBROUTINE
call :RunReports
if errorlevel 1 (
call :Log SUBEND :RunReports SUBROUTINE FAILED with Error Level:
%ERRORLEVEL%
call :Log LOG ****************************
call :Log LOG * *
call :Log LOG * ***REPORT RUN FAILED*** *
call :Log LOG * *
call :Log LOG * Review Log and perform *
call :Log LOG * corrective action *
call :Log LOG * *
call :Log LOG ****************************
goto :Summary
) ELSE (
call :Log SUBEND :RunReports SUBROUTINE FINISHED SUCCESSFULLY
)
:RunReports
call :Log LOG Running Trigger from: %TRIGGERDIR%
call :Log LOG trigger.bat %TRIGGERGATEWAY% %TRIGGERUSER% ***password***
%TRIGGERSECNS% %TRIGGERNAME%
cd /d %TRIGGERDIR%
trigger.bat %TRIGGERGATEWAY% %TRIGGERUSER% %TRIGGERPASS% %TRIGGERSECNS%
%TRIGGERNAME% | find /i "fired successfully"
set EL=ERRORLEVEL
cd /d %MYCD%
exit /b %EL%
I was unable to reproduce the error you report, using the code fragment you
posted. I suggest you send the whole code, renamed as a .txt file, to this
address: pegasus_fnlATyahooDOTcom.
CRLF is the normal line terminator for batch files. However, under WinXP, LF
appears to work too. However, Unicode is bad news.
.
- Follow-Ups:
- Re: The system cannot find the batch label specified
- From: Vizoere
- Re: The system cannot find the batch label specified
- References:
- The system cannot find the batch label specified
- From: Vizoere
- The system cannot find the batch label specified
- Prev by Date: The system cannot find the batch label specified
- Next by Date: Re: The system cannot find the batch label specified
- Previous by thread: The system cannot find the batch label specified
- Next by thread: Re: The system cannot find the batch label specified
- Index(es):
Relevant Pages
|