Skip to main content

[archive] submitting a background program

  • October 18, 2007
  • 10 replies
  • 0 views

[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?

10 replies

[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?
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").

[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?
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").

[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?
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").

[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?
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.

[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?
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.

[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?
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.

[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?
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.

[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?
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?

[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?
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?

[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?
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?