I am working with a UniData 4.1 database and am having some trouble.
I have written a unibasic program to pull data from our database. It works fine if the program is executed within the UniData env.
I am trying to schedule it to run automatically in solaris. I have seen in the UniData 5.2 Command Ref (all I could find) that using 'udt command' I should be able to kick off a udt session and have it run a unibasic pgm and when done 'quit'.
For me it just goes to the UniData prompt , ':' , and sit there.
I think I am close but stuck at this point.
any ideas? or does anyone know of UniData 4.1 doc on the web?
I found another tread where that technique was used on this forum(great source of info btw) and applied it to my script.
The UniData Commands ref for 'udt' does say that you can pass a 'program_name' after 'udt' in a shell script to run a unibasic pgm OR a ECL_command and when the pgm or cmd is done it exits. I have yet to see that work. When I try this in my script, I do go into interactive mode,but nothing else. I do see my program in the output from 'ps -ef'. It looks like 'udt unibasic.u'.
Thanks for the help, I plan on checking this forum often as there seems to be a lot of good info here and maybe I can help others from time to time.
Have you tried using the PHANTOM option. That is how we run all scripts from cron. We use version 5.1 here, but I actually looked at a version 3.1 manual and the command exists there. Usage is as follows:
udt PHANTOM process.name
This creates a log file that you can look at to see what happened in the running of the program. The log will be located in a '_PH_' directory under the account you are logged into.
one related question. Our accounting software creates a PHANTOM process every time they post gl entries...
One night I had to make a change to the udtconfig file and stop and start uniData... that gl Phantom was the only one running at the time, but had not started yet... Do the phantoms that are scheduled go away when udt is stopped and restarted? I didn't see it come back after restart, but didn't stick around too long after to see. I think it probably didn't run that night.
The PHANTOM has to be started by someone or by CRON. A PHANTOM program can be written in a way that it never stops and waits until a certain time to begin processing again. In that case I would check for a startup routine that needs to be kicked off manually, or something in your /etc/rc files that starts it at startup.
There are many ways to accomplish this so you'll just have to hunt for it.