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


We can pass more than 32k in COBOL Call..

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message

New User

Joined: 12 Jun 2008
Posts: 12
Location: Pune

PostPosted: Thu Nov 20, 2008 7:24 pm    Post subject: We can pass more than 32k in COBOL Call..
Reply with quote

Hi recently I was stuck in the COBOL calls in CICS region and sending data more than 32k.

I discussed this on same forum. I was convinced that we cannot pass data more than 32k in Call..

But it seems i was wrong.. i as able to pass 42853 bytes of data and got the response..

I am converting BASE 64 to Binary and visa versa. using the conversion modules available on net.
following are my calls and codes..

PGM1 - Main program calling Converter modules :-

Working storage :-

006800 01  WS-C-CONSTANTS.                                             
007100   05  WS-C-PGM-BIN-B64                PIC  X(08)  VALUE         
007200       'OAOZB64 '.                                               
007300   05  WS-C-PGM-B64-BIN                PIC  X(08)  VALUE         
007400       'OAOZBIN '.         
022500 01 WS-DATA-CONV.
001600    05  WS-LNK-BIN-STRING        PIC X(32000).   
001700    05  WS-LNK-BIN-LENGTH        PIC 9(8).       
001800    05  WS-LNK-B64-STRING        PIC X(59000).   
001900    05  WS-LNK-B64-LENGTH        PIC 9(8).     
001990 01  WS-REQ-WK-DATA              PIC X(60000).

procedure division :-

046700     MOVE WS-REQ-WK-DATA(1:WS-INT-LEN)         
046800                                 TO WS-LNK-BIN-STRING             
046900     MOVE WS-SMG3-INT-LEN        TO WS-LNK-BIN-LENGTH             
047100     CALL WS-C-PGM-BIN-B64 USING DFHEIBLK                         
047200                                 WS-DATA-CONV                     
047700     MOVE WS-LNK-B64-LENGTH      TO WS-CDATA-DATA-LENGTH         
047800     MOVE WS-LNK-B64-STRING(1:WS-LNK-B64-LENGTH)                 
047900                                 TO WS-DATA-AREA.                 

066700     MOVE SPACES                 TO WS-LNK-B64-STRING           
066800     MOVE ZERO                   TO WS-LNK-B64-LENGTH           
066900     MOVE WS-SUB-XML-LEN         TO WS-LNK-B64-LENGTH           
067000     MOVE WS-DESC-PAYLD (1:WS-SUB-XML-LEN)                       
067100                                 TO WS-LNK-B64-STRING           
067200     MOVE SPACES                 TO WS-LNK-BIN-STRING           
067300     MOVE ZERO                   TO WS-LNK-BIN-LENGTH           
067500     CALL WS-C-PGM-B64-BIN USING DFHEIBLK                       
067600                                 WS-DATA-CONV                   
068200     MOVE WS-LNK-BIN-STRING(1:WS-LNK-BIN-LENGTH)                 
068300                                 TO WS-DATA-AREA           

I am passing 32000 Binary data to Base 64 converter in WS-LNK-BIN-STRING it gives 42648 bytes in base 64 format in WS-LNK-B64-STRING. My program was able to receive.

When I sent this 42k string back to Base 64 to binary converter, I was expecting error as this string is more than 32k . But to my surprise this worked and I got perfect 32000 sting back in Binary format. Its was the same data message i converted to Base 64.

That means that we can pass more than 32k data in COBOL call.

My calling program is CICS program and the Called modules are cobol modules. all 3 programs have PCT entries present in CICS region.

for conversion I used modules available on Type_Description_Herehttp://www.redversconsulting.com/tools.php
I have just changed the Linkage section of both the modules as per the WS-DATA-CONV.
Can anybody tell how did this happened? I was under impression that we can not pass more than 32k data in call.
Back to top
View user's profile Send private message


Active Member

Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Thu Nov 20, 2008 7:50 pm    Post subject:
Reply with quote

LINK and XCTL has the 32K limit(COMMAREA).(This can be extended by use of Containers in CICS)
COBOL call has no such limit, so whatever results you got are not surprising.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator

Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Nov 20, 2008 8:25 pm    Post subject: Re: We can pass more than 32k in COBOL Call..
Reply with quote

Keep in mind that CALL's are local to the given CICS region. You cannot CALL program "B" if it is in another region, because each parameter is passed as an ADDRESS (not the actual data), which is in the Calling (Local) region.


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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 11 Tue Oct 18, 2016 4:50 pm
No new posts cobol embedded sql MS_Developer COBOL Programming 7 Fri Oct 14, 2016 2:39 pm
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts COBOL 5 Compile oerdgie COBOL Programming 3 Thu Oct 06, 2016 6:14 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm

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