View previous topic :: View next topic
|
Author |
Message |
Sweta Agarwal
New User
Joined: 13 Jun 2007 Posts: 2 Location: bangalore
|
|
|
|
Hi All,
I am trying to pass more than 32k of data from one AOR program to another. Program A calls Program B using XCTL. My code format is as follows.
PROGRAM A
-----------------------------------------------------------------------
Code: |
WORKING STORAGE SECTION.
.....
.....
01 WS-MQ-MESSAGE.
02 LS-MQ-FORMAT-IND PIC X(01).
02 LS-SCREEN-NM PIC X(06).
02 LS-SACCSSR-ID PIC X(10).
COPY C1LTCLM.
02 WS-MQ-LAYOUT.
COPY C1LTUNIV.
02 MQ-ERROR-MSG.
03 MQ-ERROR-CODE PIC X(05) VALUE SPACES.
03 MQ-ERROR-MSG-TXT PIC X(73).
03 FILLER PIC X(01).
02 LS-NO-SWAP-IND PIC X(1).
02 LS-PTR USAGE IS POINTER.
02 FILLER PIC X(35).
*FOR SENDING MULTIPLE RECORDS TO THE MQ MODULE
01 WS-MULTIPLE-RECORDS.
05 WS-MQ-RECORDS OCCURS 5 TIMES.
10 WS-CSA-SWAP-IND PIC X(01).
10 WS-UNIV-CLAIM-RECS PIC X(700).
LINKAGE SECTION
PROCEDURE DIVISION.
...
C9207B-MQ-HANDLING.
MOVE 'S' TO LS-MQ-FORMAT-IND
MOVE 'E02' TO LS-SCREEN-NM
MOVE TSAQ-USERID TO LS-SACCSSR-ID
MOVE LENGTH OF WS-MQ-MESSAGE TO WS-MQ-MESSAGE-LENGTH
SET LS-PTR TO
ADDRESS OF WS-MULTIPLE-RECORDS
EXEC CICS
XCTL PROGRAM (WS-MQ-PROGRAM) - THIS IS PROGRAM B
COMMAREA (WS-MQ-MESSAGE)
LENGTH (WS-MQ-MESSAGE-LENGTH)
END-EXEC. |
-----------------------------------------------------------------------
PROGRAM B
Code: |
******************************************************************
LINKAGE SECTION.
******************************************************************
01 DFHCOMMAREA.
02 LS-MQ-LAYOUT-IND PIC X(01).
02 LS-SCREEN-NM PIC X(6).
02 LS-SACCSSR-ID-CD PIC X(10).
02 LS-MQ-CLAIM-LAYOUT PIC X(300).
02 LS-MQ-UNIVERSAL-LAYOUT PIC X(700).
02 LS-ERROR-MESSAGE.
COPY C1LT0025.
02 LS-NO-SWAP-IND PIC X(1).
02 LS-PTR POINTER.
02 FILLER PIC X(35).
******************************************************************
* THIS IS THE INSTANCE OF WORKING STORAGE VARIABLE OF CALLING
* MODULE IN WHICH MULTIPLE MQ RECORDS WILL BE STORED.
* ADDRESS OF THIS VARIABLE WILL BE SET TO THE ADDRESS OF
* WORKING STORAGE VARIABLES USING POINTER VARIABLE IN THE
* PROCESSING OF MULTIPLE MQ RECORDS
******************************************************************
01 LS-MULTIPLE-RECORDS.
05 LS-MQ-RECORDS OCCURS 5 TIMES.
10 LS-CSA-SWAP-IND PIC X(1).
10 LS-UNIV-CLAIM-RECS PIC X(700).
PROCEDURE DIVISION.
........
P5000-SEND-MULTI-MQ-REC.
SET ADDRESS OF LS-MULTIPLE-RECORDS
TO LS-PTR |
After passing the address to the varaible in Program B, I now need to perform move statements to move these values to screen variables. But i realized that my LS-MULTIPLE-RECORDS doesn't have any value in it. Can you please explain me the reason for it. Is it becuase in XCTL the working storage variable get poof. If so is there any other alternative to pass these variables.
Please Help. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
If you LINKed instead of XCTLed, the data would still be there.
5 times 700 is only 3500 plus another 1000 is nowhere near 32k?
As an aside, you really should use the copybooks in both programs, it will save you when on of their lengths change.
If you really need the extended data sharing, look into containers, they do work. |
|
Back to top |
|
|
Sweta Agarwal
New User
Joined: 13 Jun 2007 Posts: 2 Location: bangalore
|
|
|
|
Hi William,
Thanks for your quick reply. The above example was just an code snippet, so the data structure is not what i am using originally. I have worked with containers earlier and hence can implement it here. But i want to use it as my last option as implementing containers in my present program will require a lot of code change. So i was looking for some alternative with the present code. Is there any other alternative method. Let me know. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
No other reasonable alternative, XCTL will release the storage you are pointing to.
I do not see containers as requiring any major code changes. Do everything just as you are doing currently and just prior to the XCTL, load your "too big" commarea into a container. In the recieving program, upon entry, unload the container into your "too big" commarea.
The load/unload coding would be performed paragraphs. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
As you are know where near the 32k limit and I see no need to use
containers as stated a LINK will solve your problems. What I did see
was the commares did not match. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Assuming the copybooks are 79, 300 and 700 bytes each, the commareas do match.
And the lack of being anywhere near the 32k limit was asked and answered:
Sweta Agarwal wrote: |
The above example was just an code snippet, so the data structure is not what i am using originally. |
|
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
The point was they should have the copybook statements in the 2nd
program. If the original copybook changes then the commarea in the
2nd program will not match and cause them problems. |
|
Back to top |
|
|
|