0

DOS Error in Metcal 9.0

Just upgraded from Metcal 7.xx to Metcal 9.0.

I am generating a DOS error “Preceding error caused termination of DOS statement” when I run the following batch file.  

 

1.034     DOS       M:\Utilities\XYZ.BAT

All this bat file does is perform a DIR *.*

 

When I look in the error listing in Metcal Editor.  There is no error listed.  I have permission to read, write, and delete in the current dir. 

I have several programs that have DOS commands for batch files.  These files have been running for years. And they generate the same error.

 

Any Ideas as to what would cause this type of error?

Ken

5 comments

Date Votes
0
Avatar
Michael Schwartz

Ken,
You are going to have to rewite all of your batchfiles and external programs with this MET/CAL 9.0 upgrade.

The problem is all the file locations have changed!  The dosdose.dat and metcal.ini files are all in a new locations, and MET/CAL is now storing the shared executables on the server instead of locally.  So there can be some added hoops you have to jump through depending on your version of Windows and IT configurations.

You can update your .ini file paths.. But that creates its own set of headaches..  You are just going to have to bite the bullet and rewite everything to make it compatable with the new version of MET/CAL.   Or go back to 7.xx for a while postponing the hair pulling out for a couple more years.  

I am kind of in the same boat.  All of our custom development tools where build in older version of the softwre.  We have 7.3 and 8.x installs.  But we are still doing all of our development in MET/CAL 7.11, becuase of the cost of retooling everything. 

Mike..
 

0
Avatar
Teague, Kenneth M. (JSC-EA5)[ROHMANN SERVICES, INC]

Mike,

While I agree with you that the files will need to be re-written to conform with the new Met Teams file structure.

What I can't figure out is why this simple DIR listing batch file cause the same error.  Its not doing anything special.

I modified it to do the following.

DIR *. /W

PAUSE

All this filie will do is List the DIr's within itself, and it still causes the same error. 

This is the error " Preceding error caused termination of DOS statement"

So the question to you is.  Have you gotten a simple batch file to run on your system?   If so, do you recall having to have any special admin privileges?  Any special settings? Any out of the ordinary settings? 

Becuase at this point I am at a loss.

Ken

 

 

 

0
Avatar
Michael Schwartz

I don't think I have used a batch file with MET/CAL sense Y2K.. I mostly stopped becuase I didn't like the DOS window changing focus.  So I may not be the best person to find an answer to this issue.. 

*.BAT files are one of the files extentions Windows doesn't like executed from remote drive like the M:\METCAL\UserPrograms..

Here are a couple things you can try.. Create a "C:\_temp" directory and move your batch file to that directory..

Then Update the MET/CAL procedure to call it from that dir... Should be something like DOS C:\_temp\my.bat..

If it dosen't work.. Try running the barch file manually when you get the MET/CAL Error.  If you have to run the batch file in administrator mode to get it to work..  Then you will have to be able to call the batch file in administrator mode.   You may be able to get MET/CAL to call the batch file in administrator mode simply by starting MET/CAL in administrator mode.  

If not.. Then you will have to create a shortcut to the batch file... In the shortcut you can specify administrator mode and other setting like the Operating System Compatability modes.    Then you can update the MET/CAL procedure so that it calls the short cut instead of the batch file..

 Once you get the batch file working with or without the shortcut, then you can see it it will allow you to run it from the remote directory.. 

If you are in good with your IT group.. They can set up the domain and your local computer to trust the user programs directory.  If you have local admin this may also work. http://superuser.com/questions/44503/how-do-i-tell-windows-7-to-trust-a-particular-network-location 

 

Mike

0
Avatar
Teague, Kenneth M. (JSC-EA5)[ROHMANN SERVICES, INC]

Mike

I finally got an answer from Fluke late last week.  All that needed to be done for this statement to work is

encapsulate the line in quotes.

 

From this

1.034     DOS       M:\Utilities\XYZ.BAT

 

To this

1.034     DOS       “M:\Utilities\XYZ.BAT”

 

So far my older procedures work as they should.  I will keep testing them, and using them to be sure.  But for now they seem to working correctly.

 

Ken

0
Avatar
Michael Schwartz

I am going to have to bush up on the DOS help file next time I am in MET/CAL.  Most of my time these days has beein in metrology.net automation. 

I got lazy years ago an wrote a dll file that all my executable files can call.  The code behind the dll loads the dosdoes.dat into memory and tracks all the metcal related files and directories.   So when Fluke makes a path change of something else.. All I have to do is update the dll and all my calling executables are updated.   I wish I could do the same for COM and take better advantage of the LIB FCS.. 

BUT... The good news is you are back up and running!  Without having to rewriting of your batch files.

 

Please sign in to leave a comment.