Home > Archive > Cobol > December 2006 > running rm cobol in a cron job
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
running rm cobol in a cron job
|
|
| lbaker@sboa.in.gov 2006-11-30, 6:55 pm |
| I have RM Cobol 7.1 running with Flexgen on AIX 4.2.1. I have the
following bat file that I have scheduled to run in the cron at a
certain time of day.
RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
export RUNPATH
TERM=vt100
export TERM
runcobol REP-WEB3.COB K
ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
rm /flextmp/fg4/repweb.txt
When I run this bat file logged in as root on the system terminal, it
runs without any errors or problems. After it runs from the cron job,
it doesn't work and I got this error message in the root mail:
Window Manager not loaded, window status: 305
then it displays some cobol errors,
Cobol I/O error 10 at line 7639 in FG4-WIO, .....
Does anyone have any idea what this means or why if runs fine manually,
but not from the cron?
Thank you.
| |
| Donald Tees 2006-11-30, 6:55 pm |
| When you run it manually, are you running it from a terminal, or from
something like KDE? It sounds to me like it needs to be run from a GUI
terminal lke Konsol or RXvt. Note that this is a WAG, I do not use RM
Cobol under Linux.
Donald
| |
| lbaker@sboa.in.gov 2006-11-30, 6:55 pm |
| I am running it from a dumb terminal.
I don't know why it would need GUI to run a job overnight.
Donald Tees wrote:
> When you run it manually, are you running it from a terminal, or from
> something like KDE? It sounds to me like it needs to be run from a GUI
> terminal lke Konsol or RXvt. Note that this is a WAG, I do not use RM
> Cobol under Linux.
>
> Donald
| |
| NotSure 2006-12-01, 7:55 am |
| On 30 Nov 2006 06:49:10 -0800, lbaker@sboa.in.gov wrote:
>I have RM Cobol 7.1 running with Flexgen on AIX 4.2.1. I have the
>following bat file that I have scheduled to run in the cron at a
>certain time of day.
>
>RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
>export RUNPATH
>TERM=vt100
>export TERM
>runcobol REP-WEB3.COB K
>ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
>rm /flextmp/fg4/repweb.txt
>
>When I run this bat file logged in as root on the system terminal, it
>runs without any errors or problems. After it runs from the cron job,
>it doesn't work and I got this error message in the root mail:
>
>Window Manager not loaded, window status: 305
>
>then it displays some cobol errors,
>
>Cobol I/O error 10 at line 7639 in FG4-WIO, .....
>
>Does anyone have any idea what this means or why if runs fine manually,
>but not from the cron?
>
>Thank you.
The I/O error 10 suggests that a read is not finding a file it
expects.
Are you sure you are setting _all_ the environmental variables in the
batch file as are set when you log into a dumb terminal? Perhaps a
path to a configuration file or some such?
| |
| Michael Russell 2006-12-02, 6:55 pm |
| Top post.
Cron jobs need extra work to ensure the environment is set as
you want it - typically, I think, you get pretty well nothing
set up - no .profile, .login or whatever doing it as for a
'manual' user.
Hope that helps.
Michael
lbaker@sboa.in.gov wrote:
> I have RM Cobol 7.1 running with Flexgen on AIX 4.2.1. I have the
> following bat file that I have scheduled to run in the cron at a
> certain time of day.
>
> RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
> export RUNPATH
> TERM=vt100
> export TERM
> runcobol REP-WEB3.COB K
> ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
> rm /flextmp/fg4/repweb.txt
>
> When I run this bat file logged in as root on the system terminal, it
> runs without any errors or problems. After it runs from the cron job,
> it doesn't work and I got this error message in the root mail:
>
> Window Manager not loaded, window status: 305
>
> then it displays some cobol errors,
>
> Cobol I/O error 10 at line 7639 in FG4-WIO, .....
>
> Does anyone have any idea what this means or why if runs fine manually,
> but not from the cron?
>
> Thank you.
>
| |
| P. Raulerson 2006-12-02, 6:55 pm |
| It may not need a graphical terminal, but it does indeed need a terminal,
which I am afraid you do not have from Cron. You might want to check with
Liant to see if you can just do something like redirect STDOUT and STDERR
and get it to work the way you wish.
-Paul
<lbaker@sboa.in.gov> wrote in message
news:1164905323.503690.256700@n67g2000cwd.googlegroups.com...
>I am running it from a dumb terminal.
>
> I don't know why it would need GUI to run a job overnight.
>
> Donald Tees wrote:
>
| |
| lbaker@sboa.in.gov 2006-12-05, 7:55 am |
| Thanks for the suggestions. I will check on some of these things.
Linda
| |
| lbaker@sboa.in.gov 2006-12-21, 6:55 pm |
| I would like the batch file below to run automatically in a cron job.
When I am logged in and run it, without the >all.out 2>error.out, it
displays the message that I normally see that the report is sorting and
works fine. But it was not working in the cron overnight. When I
added the >all.out and 2>error.out and run it when I am logged in, it
runs for a while and nothing happens. I hit CTRL-C to cancel it and in
the all.out file, I get
Window Status: 305
Window Manager not Loaded
and in the error.out file, I get
COBOL operator requested termination at line 7639 in FG4-WIO
(/flextmp/fg4/fg4bin/FG4-WIO.COB) compiled 2001/07/27 11:34:15.
COBOL traceback at line 1277 in REP-WEB3.COB
(/flextmp/fg4/REP-WEB3.COB)
compiled 2006/11/17 17:08:32
Does anyone know what else I need or what I am doing wrong?
Thanks.
RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
export RUNPATH
TERM=vt100
export TERM
runcobol REP-WEB3.COB >all.out 2>error.out K
ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
rm /flextmp/fg4/repweb.txt
P. Raulerson wrote:[color=darkred]
> It may not need a graphical terminal, but it does indeed need a terminal,
> which I am afraid you do not have from Cron. You might want to check with
> Liant to see if you can just do something like redirect STDOUT and STDERR
> and get it to work the way you wish.
>
> -Paul
>
> <lbaker@sboa.in.gov> wrote in message
> news:1164905323.503690.256700@n67g2000cwd.googlegroups.com...
| |
| Richard 2006-12-21, 6:55 pm |
|
lbaker@sboa.in.gov wrote:
> I would like the batch file below to run automatically in a cron job.
> When I am logged in and run it, without the >all.out 2>error.out, it
> displays the message that I normally see that the report is sorting and
> works fine.
> RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
> export RUNPATH
> TERM=vt100
> export TERM
> runcobol REP-WEB3.COB >all.out 2>error.out K
> ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
> rm /flextmp/fg4/repweb.txt
In a cron job almost nothing is set for you. It may be the PATH or some
other that you require, or it may be that all you need is a cd to the
correct directory.
Try logging in an do a: set >logged.set
add to the cron job: set >cron.set
and then compare them adding differences to the cron until the problem
is fixed.
| |
| lbaker@sboa.in.gov 2006-12-22, 6:55 pm |
| I changed my bat file to this:
TERM=vt100
export TERM
PATH=./:/usr/ucb:/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/lpp/X11/bin:/usr/rn
RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
export PATH RUNPATH
export ENV=$HOME/.kshrc
set -o vi
set >cron.set
runcobol REP-WEB3.COB K
ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
rm /flextmp/fg4/repweb.txt
When it runs, I get this error in the root mail and there is not a
cron.set file to check:
Window Status: 305
Window Manager not Loaded
COBOL I/O error 10 at line 7639 in FG4-WIO
(/flextmp/fg4/fg4bin/FG4-WIO.COB)
compiled 2001/07/27 11:34:15.
COBOL traceback at line 1277 in REP-WEB3.COB
(/flextmp/fg4/REP-WEB3.COB)
compiled 2006/11/17 17:08:32.repweb.txt: A file or directory in the
path name d.
Local directory now /flextmp/fg4
rm: /flextmp/fg4/repweb.txt: A file or directory in the path name does
not exis.
Thanks.
Richard wrote:
> lbaker@sboa.in.gov wrote:
>
>
> In a cron job almost nothing is set for you. It may be the PATH or some
> other that you require, or it may be that all you need is a cd to the
> correct directory.
>
> Try logging in an do a: set >logged.set
>
> add to the cron job: set >cron.set
>
> and then compare them adding differences to the cron until the problem
> is fixed.
| |
| Richard 2006-12-22, 6:55 pm |
|
lbaker@sboa.in.gov wrote:
> When it runs, I get this error in the root mail and there is not a
> cron.set file to check:
So the cron job is in the root user ? You will probably find cron.set
in the root user's home directory. You may also find that $HOME is not
an appropriate setting.
Why aren't you running this cron under your normal user ?
> Local directory now /flextmp/fg4
That implies that the program changed it. Running cron as user may
help but also do a specific cd to this before starting the program.
| |
| P. Raulerson 2006-12-22, 6:55 pm |
| Ah-- that WIO error indicates that your program is trying to open a window
to do some I/O to. I believe in particular, that is a GUI window.
Check your program and make sure you are not writing to anything but
standard in and standard out.
-Paul
<lbaker@sboa.in.gov> wrote in message
news:1166730595.744395.186620@i12g2000cwa.googlegroups.com...
>I would like the batch file below to run automatically in a cron job.
> When I am logged in and run it, without the >all.out 2>error.out, it
> displays the message that I normally see that the report is sorting and
> works fine. But it was not working in the cron overnight. When I
> added the >all.out and 2>error.out and run it when I am logged in, it
> runs for a while and nothing happens. I hit CTRL-C to cancel it and in
> the all.out file, I get
>
> Window Status: 305
> Window Manager not Loaded
>
> and in the error.out file, I get
>
> COBOL operator requested termination at line 7639 in FG4-WIO
> (/flextmp/fg4/fg4bin/FG4-WIO.COB) compiled 2001/07/27 11:34:15.
> COBOL traceback at line 1277 in REP-WEB3.COB
> (/flextmp/fg4/REP-WEB3.COB)
> compiled 2006/11/17 17:08:32
>
> Does anyone know what else I need or what I am doing wrong?
>
> Thanks.
>
> RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
> export RUNPATH
> TERM=vt100
> export TERM
> runcobol REP-WEB3.COB >all.out 2>error.out K
> ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
> rm /flextmp/fg4/repweb.txt
>
>
> P. Raulerson wrote:
>
| |
|
|
<lbaker@sboa.in.gov> wrote in message
news:1164898150.541415.57560@l12g2000cwl.googlegroups.com...
>I have RM Cobol 7.1 running with Flexgen on AIX 4.2.1. I have the
> following bat file that I have scheduled to run in the cron at a
> certain time of day.
>
> RUNPATH=/flextmp/fg4:/flextmp/fg4/fg4bin:
> export RUNPATH
> TERM=vt100
> export TERM
> runcobol REP-WEB3.COB K
> ftp -n ftppublish.ai.org </flextmp/fg4/ftpweb2.txt
> rm /flextmp/fg4/repweb.txt
>
> When I run this bat file logged in as root on the system terminal, it
> runs without any errors or problems. After it runs from the cron job,
> it doesn't work and I got this error message in the root mail:
>
> Window Manager not loaded, window status: 305
>
> then it displays some cobol errors,
>
> Cobol I/O error 10 at line 7639 in FG4-WIO, .....
>
> Does anyone have any idea what this means or why if runs fine manually,
> but not from the cron?
>
> Thank you.
>
My best guess is that the terminal database that you are using does not
contain enough information to display a pop-up window. I see where you are
setting the TERM=vt100 but I don't think that is what you are really
getting. Perhaps it cannot find the terminfo database. For an experiment,
set your RUNPATH and then set TERM=dumb and run the program from the command
line. I'll bet you get the same "Window Manager not loaded" error.
Is there an ACCEPT statement at line 7639 in FG4-WIO? My guess is that this
code is probably getting executed because of the 305 Window status.
Hope this helps.
Robert Heady
Liant Software Corp.
|
|
|
|
|