I'm on LSF 9.0.0.6, Windows Server 2003, SQL-Server 2005, with my apps and web products on one box (WCHLAWAPP01) and my database on another (WCHLAWDB01).
I'm trying to use tokendef to call a batch file that resides on my app server. Within the batch file is a SQL command that I use to kick off an interface on the database server. Running the batch file directly from a DOS cmd prompt results in a successful execution with no errors. However, running it from a job definition within Lawson to execute the custom token results in the job going into Needs Recovery (see attached). I've used tokendef plenty of times before so it's not like I'm unfamiliar with it. What troubleshooting steps can I take to determine why this is failing?
, file has been sent to you for review. Thanks for taking a look.
OK, I figured it out, though I'm pretty sure we have some sort of unidentified environment issue, either with the third-party tools (MKS Toolkit, NetExpress, etc.) or if it's something else. Or maybe this is "just the way it is" under the LSF9 environment.
I made two changes:
(1) Changed the file extension of my batch file from bat to cmd. I don't believe this actually has a bearing on things, but reading up on batch files in general and their use on later Windows server operating systems suggested this was a prudent change. (2) In my tokendef command, I preceded the command with the word "start". My resulting command string was: start F:/LAWPROD/triggers/LAW_ACCOUNT_ASSIGN.cmd
When I looked at the examine log for the job, the first thing that struck me was that the executable command was executed from my C:\MKS\mksnt folder rather than from where the batch file is located (F:/LAWPROD/triggers). I was expecting the 'Start' prefix on my command line to just spawn a Windows process to execute the batch file; I was surprised to see that MKS actually spawned the process.
In any case, I am happy to get my jobs executing as they should.