Author |
Message |
Greig
Joined: 15 Mar 2001 Posts: 49
|
|
Minimize Program Windows |
|
We run several JCL jobs which in turn run DOS batch files using the RunAndWait command. I would like those DOS windows to be automatically Minimized. Is this possible from within a JCL job? I know that is possible for jobs run as Programs but I really need to run them as JCL
|
|
Thu Jan 24, 2002 8:45 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Minimize Program Windows |
|
You cannot run them minimized, but you can use some other tricks: 1. You can run them in a single minimized DOS window. Just enable tracing in the 24x7 and minimize the trace window. That's it. 2. You can run them completely hidden. Create and schedule a new "program type" job that will run the first job using 24x7 command. Set the schedule for the first job to [no schedule]. Set the new job to run synchronous and in a hidden window (use Window Size job property). All spawned child processes run by the first job will also run hidden. : We run several JCL jobs which in turn run DOS batch files using the : RunAndWait command. I would like those DOS windows to be automatically : Minimized. Is this possible from within a JCL job? I know that is possible : for jobs run as Programs but I really need to run them as JCL
|
|
Thu Jan 24, 2002 10:21 am |
|
 |
Greig
Joined: 15 Mar 2001 Posts: 49
|
|
Re: Minimize Program Windows |
|
I am interested in exploring option 2. So what I need to do is create a job which executes a batch file. Inside the batch file, I put "24x7 /JOB " so that it will call the JCL job. Is this correct? A related point: how are job_ids maintained? Is it possible that the job_id might change? : You cannot run them minimized, but you can use some other tricks: 1. You can : run them in a single minimized DOS window. Just enable tracing in the 24x7 : and minimize the trace window. That's it. : 2. You can run them completely hidden. Create and schedule a new : "program type" job that will run the first job using 24x7 : command. Set the schedule for the first job to [no schedule]. Set the new : job to run synchronous and in a hidden window (use Window Size job : property). All spawned child processes run by the first job will also run : hidden.
|
|
Thu Jan 24, 2002 10:49 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Minimize Program Windows |
|
You are correct. The job ID is unique in 24x7 version 3 and it doesn't change. In version 2 it can change and even can be reused if a job is deleted. But you can still use "24x7 /JOB" with job names (of course if you use unique job names). 24x7 understands both IDs and names in the command line. : I am interested in exploring option 2. So what I need to do is create a job : which executes a batch file. Inside the batch file, I put "24x7 /JOB : " so that it will call the JCL job. Is this correct? : A related point: how are job_ids maintained? Is it possible that the job_id : might change?
|
|
Thu Jan 24, 2002 10:56 am |
|
 |
Greig
Joined: 15 Mar 2001 Posts: 49
|
|
Re: Minimize Program Windows |
|
OK, I tried this, and while I can run the batch job from the Desktop, when I run it in 24x7, the trace window pops up briefly with the message "COMMAND LINE>> JOB #45 not found". If I try to put the name of the job in the command line instead of the job_id, it tries to open up another instance of 24x7. : You are correct. The job ID is unique in 24x7 version 3 and it doesn't : change. In version 2 it can change and even can be reused if a job is : deleted. But you can still use "24x7 /JOB" with job names (of : course if you use unique job names). 24x7 understands both IDs and names : in the command line.
|
|
Thu Jan 24, 2002 11:26 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Minimize Program Windows |
|
That's right, it must open another instance of 24x7, which will run the job specified in the command line. The actual trick is that you can set that new instance to run hidden. That new instance will automatically exit after running the specified job. : OK, I tried this, and while I can run the batch job from the Desktop, when I : run it in 24x7, the trace window pops up briefly with the message : "COMMAND LINE>> JOB #45 not found". : If I try to put the name of the job in the command line instead of the : job_id, it tries to open up another instance of 24x7.
|
|
Thu Jan 24, 2002 11:33 am |
|
 |
Greig
Joined: 15 Mar 2001 Posts: 49
|
|
Re: Minimize Program Windows |
|
Ok, after some testing here is what I have found: Running a batch file with "24x7 /JOB 45" works OK. Running a batch file with "24x7 /JOB Test Minimize" causes another 24x7 instance to start with a message saying that 24x7 is already running. "Test Minimize" is the name of job 45. Calling the batch file that has "24x7 /JOB 45" causes the error "COMMAND LINE>> Job #45 not found". This can be rectified by putting "24x7 /JOB 45" directly into the Command Line field in the Job Properties Wizard. When running "24x7 /JOB 45" as a hidden job, job 45 runs but is not hidden. I tried making it a detached job, and it then runs under another instance of 24x7 but the DOS box still pops up on screen. : That's right, it must open another instance of 24x7, which will run the job : specified in the command line. The actual trick is that you can set that : new instance to run hidden. That new instance will automatically exit : after running the specified job.
|
|
Thu Jan 24, 2002 11:51 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Minimize Program Windows |
|
I'm still experimenting with it. Will get back to you as soon as I have some useful results. : Ok, after some testing here is what I have found: Running a batch file with : "24x7 /JOB 45" works OK. Running a batch file with "24x7 : /JOB Test Minimize" causes another 24x7 instance to start with a : message saying that 24x7 is already running. "Test Minimize" is : the name of job 45. : Calling the batch file that has "24x7 /JOB 45" causes the error : "COMMAND LINE>> Job #45 not found". This can be rectified : by putting "24x7 /JOB 45" directly into the Command Line field : in the Job Properties Wizard. : When running "24x7 /JOB 45" as a hidden job, job 45 runs but is not : hidden. I tried making it a detached job, and it then runs under another : instance of 24x7 but the DOS box still pops up on screen.
|
|
Thu Jan 24, 2002 1:00 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Minimize Program Windows |
|
If you start 24x7 in the 24x7 home directory you should be fine. If you call it from a batch file, make sure to change the current directory using CD command. Also make sure that the job is not disabled, otherwise you would get "COMMAND LINE >> Job #xxx not found" error. : I'm still experimenting with it. Will get back to you as soon as I have some : useful results.
|
|
Thu Jan 24, 2002 4:16 pm |
|
 |
|