Implementing CICS TWA in AWS Bluage

0

Hello

How to implement CICS TWA (Transactional work area) in AWS Bluage? For the CICS command - EXEC CICS ADDRESS
TWA (BLL-PTR-TWA)
END-EXEC SET ADDRESS OF TRAN-TWA TO BLL-PTR-TWA From the transformation code, getting error - InvalidAddressException: Cannot access to memory with an unallocated address

What could be the reason? what is the equivalent transformation code ?

Thanks

S M Rao
asked 3 months ago116 views
1 Answer
0

Hi S M Rao,

Please go through the below steps i hope it will helps to resolve your issue.

Steps to Resolve

Initialize the Pointer: Ensure that BLL-PTR-TWA is properly initialized before it is used. In COBOL, this typically means ensuring it points to a valid memory location.

Allocate Memory for TWA: In the AWS Bluage environment, ensure that memory for the TWA is properly allocated before accessing it. This might involve using specific APIs or methods provided by AWS Bluage for memory management.

Correct Transformation Code: Verify that the transformation code generated by AWS Bluage is correctly handling the memory addressing. You might need to manually adjust the transformation code if the automated process does not handle this scenario correctly.

Equivalent Transformation Code In AWS Bluage, you need to ensure that memory management and pointer initialization are correctly handled. Here is an example of how you might manually adjust the transformation code:


* Example in COBOL
01  TWA-AREA.
    05  TWA-DATA PIC X(100).

01  BLL-PTR-TWA USAGE POINTER.

* Initialize pointer to TWA area
SET ADDRESS OF TWA-AREA TO BLL-PTR-TWA

* CICS command to address TWA
EXEC CICS ADDRESS
     TWA(BLL-PTR-TWA)
END-EXEC

* Now BLL-PTR-TWA points to the TWA area

In the transformed code, ensure that:

  • TWA-AREA is properly allocated.
  • BLL-PTR-TWA is correctly initialized.

Example in a Transformed Environment (Pseudo-Code) This is a conceptual example and might need adjustments based on the specific APIs and syntax used in AWS Bluage:

// Example in AWS Bluage pseudo-code

// Allocate memory for TWA
TWA_AREA = allocateMemory(100); // Allocate 100 bytes for TWA

// Initialize pointer
BLL_PTR_TWA = getAddressOf(TWA_AREA);

// Equivalent to EXEC CICS ADDRESS TWA(BLL-PTR-TWA)
cicsAddressTwa(BLL_PTR_TWA);

// Now BLL_PTR_TWA points to TWA_AREA

Recommendations

  • Consult Documentation: Refer to AWS Bluage documentation for specific details on memory management and addressing.

  • Manual Adjustments: Be prepared to make manual adjustments to the transformed code to ensure it handles memory correctly.

  • Support: If issues persist, consider reaching out to AWS support or AWS Bluage support for more detailed guidance.

EXPERT
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago
  • Thanks for the reply. Allocated memory like this.. jics.parameters.cwa.length: 40 jics.parameters.twa.length: 100

  • Hello While accessing linkage section variables (TWA-AREA), getting error - Cannot access to memory with a null pointer. What could be the reason..?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions