different behaviour in fg and bg

fg = foreground bg = background
I have a cobol program that I start with a very simple script.
The script is not at fault as it has not changed and the program worked in fg and bg before.
I have altered the logging in the program and moved my cursor declare to working storage.
The program runs as a daemon sleeping and checking every minute if it needs to run.
now when I run in foreground - it works creating the log file and reading the records from the oracle database
when run ./start_script& (in background)
no log file in /tmp
no records selected from oracle although in exact state as those set for foreground test?
Any help appreciated

Regards
Bruce

What happens when you execute fg after running the program in the background? Does it start going?

I will try that on Monday as I am off home now thanks for the reply

When started in bg the log file is not created database not accessed
When brought into fg then the program runs exactly as expected

And nothing else changed on your system? What OS and more specifically what cobol ?

nothing else changed

(3,audev)/usr4/i/xj410235/bin $ cd /usr1/au/scripts
(3,audev)/usr1/au/scripts $ ./xjr1405_start &
[1] 29330
(3,audev)/usr1/au/scripts $ cd /tmp
[1] + Stopped (tty output) ./xjr1405_start &
(3,audev)/tmp $ ls -lrt XJ* | grep 'Dec 15'
-rw-rw-rw- 1 G774AHE users 641 Dec 15 10:16 XJR1405_20111215093926
.log
-rw-rw-rw- 1 G774AHE users 7623 Dec 15 10:25 XJR1405_20111215093429
.log
-rw-rw-rw- 1 G774AHE users 11137 Dec 15 11:17 XJR1405_20111215103729
.log
-rw-rw-rw- 1 G774AHE users 33136 Dec 15 11:36 XJR1405_20111215112743
.log
(3,audev)/tmp $ ps -ef | grep xj
G774AHE 199 27651 1 13:19:14 ttyp8 0:00 grep xj
G774AHE 29336 29330 0 13:18:05 ttyp8 0:00 /usr/local/bin/oraclerun /usr1/a
u/bin/xjr1405
G774AHE 29330 27651 0 13:18:05 ttyp8 0:00 /bin/ksh ./xjr1405_start

unix is HP-UX; cobol is microfocus cobol server express v5.0; Oracle 9i

This is repeatable - but if started in fg and ctrl-Z issued then process remains functional

I dont think it has to do with cursor declaration, but what about your alteration can you say more?