I am working on a Wrapper / Bridge COBOL program that processes program calls and performs end-to-end operations such as logging, security checking, etc. The main motivation is to check access to security for a consumer program, regardless of whether it has access to a call from a producer program or not.
Let the COBOL bridge program be B1 and the producer program P1 and the consumer (client) C1.
When C1 wants to call P1, he must call B1. Then B1 checks for availability. If C1 has access, then B1 calls P1 with data C1.
C1 -> B1 -> P1
Here, the communication section of B1 and P1 is the same. Programs use EXEC CICS LINK to call each other.
COMMAREA,
COMMAREA1 (DataSet Name) 01 COMMAREA-STRUCT, 03 a-field 03 another-field ...
Customer;
IDENTIFICATION DIVISION. PROGRAM-ID. Client. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. COPY COMMAREA1 PROCEDURE DIVISION .... EXEC CICS LINK PROGRAM (B1Bridge) NOHANDLE COMMAREA (COMMAREA-STRUCT) LENGTH (LENGTH OF COMMAREA-STRUCT) END-EXEC ....
Bridge,
IDENTIFICATION DIVISION. PROGRAM-ID. B1Bridge. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. LINKAGE SECTION. COPY COMMAREA1 PROCEDURE DIVISION ... ... EXEC CICS LINK PROGRAM (P1) NOHANDLE COMMAREA (COMMAREA-STRUCT) LENGTH (LENGTH OF COMMAREA-STRUCT) END-EXEC ....
Manufacturer;
IDENTIFICATION DIVISION. PROGRAM-ID. P1 ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. LINKAGE SECTION. COPY COMMAREA1 PROCEDURE DIVISION .... *doing some business with data in COMMAREA1 ...
When I try to execute above, I received a compilation warning for Bridge Program B1; "COMMAREA-STRUCT or one of its subordinates was specified, but COMMAREA-STRUCT was a LINKAGE SECTION element that was not targeted. This link will not be resolved successfully when executed."
What does it mean? How do I transfer the B1 binding section to the P1 binding section?
When I try to do this, I got EIBRESP: 22 and EIBRESP2: 26 (network length error) at runtime.
- Change -
I think I should give more detailed information;
Main motivation; In fact, there are two companies - the company COM1 and COM2. COM2 has been an affiliate of COM1 for several years. COM1 and COM2 have CICS1 and CICS2 respectively. And COM2 client programs use COM1 manufacturing programs. COM2 clients never call COM1 manufacturers directly. COM2 clients put data into COMMAREA-STRUCT and invoke the universal Cobol program (let it be GCP) remotely. COMMAREA-STRUCT also has a "manufacturer name" field, which GCP determines which program should be called. Thus, GCP exports the data from COMMAREA-STRUCT and the map to the manufacturer’s fields. GCP performs mapping operations dynamically with addressing (not for every manufacturer). After execution by the manufacturer, GCP takes the result and passes it to the client through COMMAREA-STRUCT. The system was designed this way a few years ago. There are thousands of COM2 customers and thousands of COM1 manufacturers.

Now COM2 wants to be separate from COM1. Thus, COM1 no longer wants to provide full access to all resources (manufacturers) of COM1. Thus, COM1 wants to put new loops before CICS1, which will be a CICS handler that runs only the B1 Bridge program locally. This also applies to network security and political and political decisions.
In order to separate companies from each other after a while, neither customers nor manufacturers should be affected. So, the problem should be solved in the GCP-Bridge layer.
That is why the B1 bridge must behave like a GCP for COM2 clients, must check the availability (somehow, we used it) and transfer all the data coming from the clients to GCP without any changes.
Currently, the registration operation has no priority. We will focus a little on companies.
Therefore, I am very grateful for your expert comments.
* We cannot use CALL because B1 will be on another CICS and will not be able to access LOADLIB1 COM1, therefore B1 must delete GCP remotely using EXEC CICS LINK.
* Instead of passing through a comma, channel transmission sounds good to me. We will discuss this.
* By the way, I will check the half-word conflict on LENGHT OF. You're right.
* For security checks, we will discuss "COMPLETE CICS QUICY SECURITY."
* As mentioned above, we cannot modify copies of books. Only we can change
EXEC CICS LINK PROGRAM (GCP)
to
EXEC CICS LINK PROGRAM (B1)
find and replace on customers. Because thousands of customers. We do not want to change the book and touch them.
In the light of these details, I think the problem is becoming more understandable.