CICS BAC request server callable API

You can invoke the CICS BAC request server from a CICS application program using the EXEC CICS LINK command. You can issue any of the SET resource object commands, such as SET FILE. To call the CICS BAC CICS request server, link to program CBKCLINK and pass it the appropriate COMMAREA, as follows:
EXEC CICS LINK PROGRAM(‘CBKCLINK’) COMMAREA(commarea) LENGTH(calength)

In the above example, commarea is a storage area containing the CICS BAC request, and calength is a halfword value containing the length of commarea. The storage area layout for the COMMAREA is mapped by SCBKSAMP member CBKAPI for assembler language programs. Comments in the SCBKSAMP members explain the various fields and their use.

When you call the CICS BAC CICS request server from an application program, you must obey the following rules:
  • CICS BAC must be active in the CICS region.
  • You can only issue one command at a time.
  • Set to null values all reserved, unused, and filler storage areas in the COMMAREA.
  • Set to null values all variables that are not used or are not relevant to the command being issued.
  • Ensure you follow the CICS BAC batch request utility rules for accepted combinations of parameters.
  • Ensure you follow the CICS BAC batch request utility rules for required and minimum parameters for a command.
  • Each invocation is independent, even within the same CICS unit of work, and your application program cannot derive any value from a previous invocation.

CICS BAC provides a sample program for invoking the CICS BAC request server to close and disable a file and set it to read-only status in member CBKCAPI of the SCBKSAMP data set.