IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
udaysnimje

New User


Joined: 12 Jun 2008
Posts: 12
Location: Pune

PostPosted: Thu Nov 20, 2008 7:24 pm
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 :-

Code:
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 :-

Code:
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             
047000                                                                 
047100     CALL WS-C-PGM-BIN-B64 USING DFHEIBLK                         
047200                                 WS-DATA-CONV                     
047600                                                                 
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.                 
048000                                                                 



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           
067400****                                                             
067500     CALL WS-C-PGM-B64-BIN USING DFHEIBLK                       
067600                                 WS-DATA-CONV                   
068000*                                                               
068100     MOVE WS-LNK-BIN-LENGTH      TO WS-CDATA-DATA-LENGTH         
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
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Nov 20, 2008 7:50 pm
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
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.

HTH....

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top