Need help\\documentation on how to add a program to services.This would automatically start when the server gets rebooted. Need the command line or how to submit it to services via task manager? Can a cobol program handle this or????
Need help\\documentation on how to add a program to services.This would automatically start when the server gets rebooted. Need the command line or how to submit it to services via task manager? Can a cobol program handle this or????
Good morning.
What Operating System you need to set this on?
Assuming it's Windows, you may find useful tutorials on-line.
For example:
How to Run Any Program as a Background Service in Windows
On the ACUCOBOL-GT side, you need to use a command-line that's composed by the runtime executable, the options you already use to launch your program and the program name.
For example:
wrun32.exe -c c:\\etc\\cblconfi <anyother options> MainBatchProgram.acu
Don't forget to set the wrun32.exe bin folder in the system PATH environment variable.
Alternatively, you can use the full path in the previous command-line:
"C:\\Program Files (x86)\\Micro Focus\\extend 10.3.0\\bin\\wrun32.exe" -c c:\\etc\\cblconfi .....
As this program will be launched in background, you'll have to verify that the program does not contain any DISPLAY or ACCEPT statement.
Looking forward for your feedback.
Good morning.
What Operating System you need to set this on?
Assuming it's Windows, you may find useful tutorials on-line.
For example:
How to Run Any Program as a Background Service in Windows
On the ACUCOBOL-GT side, you need to use a command-line that's composed by the runtime executable, the options you already use to launch your program and the program name.
For example:
wrun32.exe -c c:\\etc\\cblconfi <anyother options> MainBatchProgram.acu
Don't forget to set the wrun32.exe bin folder in the system PATH environment variable.
Alternatively, you can use the full path in the previous command-line:
"C:\\Program Files (x86)\\Micro Focus\\extend 10.3.0\\bin\\wrun32.exe" -c c:\\etc\\cblconfi .....
As this program will be launched in background, you'll have to verify that the program does not contain any DISPLAY or ACCEPT statement.
Looking forward for your feedback.
I tried the task Scheduler but it gets hung up and just keeps running.
I have checked the program for displays and accept.
The only accept is for the Date and time.
As I check for a file that exists in a certain folder I am wondering if the return code is what is hanging this up?
Any thoughts?
Any debug available via task scheduler or services?
Need help\\documentation on how to add a program to services.This would automatically start when the server gets rebooted. Need the command line or how to submit it to services via task manager? Can a cobol program handle this or????
here is the batch job I am running in the task scheduler.
SET A_CONFIG C:\\UNIACU\\ETC\\CBLCONFI
"C:\\Program Files (x86)\\Micro Focus\\extend 10.3.0\\AcuGT\\bin\\wrun32.exe" -un D:\\PFIPRD\\PVMEXEC\\BARCALSV
here is the batch job I am running in the task scheduler.
SET A_CONFIG C:\\UNIACU\\ETC\\CBLCONFI
"C:\\Program Files (x86)\\Micro Focus\\extend 10.3.0\\AcuGT\\bin\\wrun32.exe" -un D:\\PFIPRD\\PVMEXEC\\BARCALSV
Good morning.
It can be that the user-name under which the runtime is executed has not enough permissions to access this D:\\ drive or its sub-folders.
Have you tried, just for a test, to use C:\\ and see if things improve?
If it works accessing files and programs on C:\\ then you have to check your user-name's permissions.
Unfortunately, there's no way to debug a program run in background.
What you can do is to track the runtime work in a log file.
Your program should be compiled for debugging (-ga),
then add the following variables to your CBLCONFI:
FILE_TRACE 9
FILE_TRACE_FLUSH 1
FILE_TRACE_TIMESTAMP 1
PARAGRAPH_TRACE 1
Modify your command-line adding the following option after wrun32.exe: -le C:\\anExistingFolder\\wrun32.log
At this point, you should have more information about what's processed and where the runtime hangs.
More details can be tracked in the log file by using customized DISPLAYs... UPON SYSERR.
You should add this line in your program file:
SPECIAL-NAMES.
SYSERR IS ERROR-LOG.
Then add DISPLAYs where necessary along your source code, especially where you think the runtime is hanging.
For example:
OPEN INPUT filename
DISPLAY "OPEN INPUT filename executed" UPON ERROR-LOG
OPEN OUTPUT filename2
DISPLAY "OPEN OUTPUT filename2 executed" UPON ERROR-LOG
etc.
At the end, these comments will be recorded in the wrun32.log file and you should be able to gather more information about the execution of your program.
Looking forward for your feedback.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.