Setting up and running a CICS BAC batch request utility

About this task

You can invoke the CICS BAC batch request utility program as a job step in one of your regular batch jobs, where you need obtain access to resources that might be allocated and open in a CICS® region. For example, if you have a routine batch job that needs to open for update a data set that is typically open and online in a CICS region, you can include a job step that invokes the CICS BAC batch request utility, and through the utility pass a request to the CICS BAC request server to close the data set that is open as a CICS file. The following steps summarize what happens in this example:
  • Your CICS BAC job step passes a CICS BAC SET FILE(filename) OPENSTATUS(CLOSED) ENABLESTATUS(DISABLED) command as an EXCI DPL request to the CICS target region. The region can either be specified explicitly on the command or it can be the default region set in an earlier CICS BAC DEFAULT command.
  • CICS receives the DPL request and executes the CICS BAC request server program to process the command, which results in an EXEC CICS SET FILE CLOSED DISABLED command. Note that the disabled option ensures that the file cannot be opened implicitly by a CICS transaction issuing an EXEC CICS READ command, and it must be explicitly enabled before it can be used again by CICS.
  • Access to the CICS BAC control file is handled by the CICS BAC request server subtask (CBKCRHST), which updates the status of the file record in the control file to CLOSED DISABLED.
  • The CICS BAC request server returns the results of the command to the CICS BAC batch request utility. If the command has executed successfully, your batch job can continue with the main job step to process the file.