Highlighted
Absent Member.
Absent Member.
287 views

[archive] submitting a background program

[Migrated content. Thread originally posted on 18 October 2007]

I have a screen which accepts data from the user to be used as parameters passed to a batch program (a report). I have both modules written in AcuCobol vers 7.01 but am unsure of the proper method of submitting the batch program so that it continues to run when the screen program is closed. Both CALL PROGRAM and CHAIN will not progress beyond the sentence until the report completes?
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] submitting a background program

What you are looking for is CALL IN THREAD "YourBatchProgram" HANDLE IN YourHandleName USING YourPassedParameters.

This will run your batch program in a separate thread allowing your screen to continue to do what ever it is the user wants to do.

EDIT

Ah sorry I missed the part about you closing the main window... I think you may need to call it with a separate runtime using a system call. (i.e. CALL "C$SYSTEM" USING "runcbl YourBatchProgram").
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] submitting a background program

Thanks. I've been working on the C$SYSTEM call, trying to work out the configuration problems with MPUX - when I submit runcbl I get the following:
*** MPUX ABORT (Pin=12816) ***
Session is not active ($MPE_JOBNUM not set).

Our IT people have turned over and I'm having trouble getting this to run in a Unix environment w/o the mpux emulator.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] submitting a background program

if you use threads to achieve this then this will mean that the batch program you call is part of the same run unit and therefore you should not close down the main acucocol run unit until the other thread is finished. If this is not satisfactory for you then 'c$run' may be a better alternative for what you want as this will start run the batch file as a parallel and independent unit. We use this for starting up email processes and so on that need to run independently of what the user does in the main system - i.e. they may wish to log out altogether but not have the email process halted. This is only for Windows however.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] submitting a background program

I cant use a thread as I need an independent run unit. It appears the problem that I need to find a work around is how to submit an AcuCobol application from the Unix prompt when the installation of AcuCobol specified an MPE system - we are running the mpux mpe emulator. When I attempt to run the app with the runcbl command I get the above message (in my last post). Does anyone know of a work around so that I can submit a runcbl programname on unix setup with mpux?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.