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
 

 

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
udaysnimje

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

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: 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: 2502
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.

HTH....

Bill
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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