Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

passing more than 32k data using pointers and xctl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Sweta Agarwal

New User


Joined: 13 Jun 2007
Posts: 2
Location: bangalore

PostPosted: Wed Jun 13, 2007 2:19 pm    Post subject: passing more than 32k data using pointers and xctl
Reply with quote

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
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jun 13, 2007 2:34 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Sweta Agarwal

New User


Joined: 13 Jun 2007
Posts: 2
Location: bangalore

PostPosted: Wed Jun 13, 2007 2:41 pm    Post subject: Thanks
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jun 13, 2007 3:09 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Jun 13, 2007 7:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Jun 13, 2007 10:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Jun 13, 2007 10:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us