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

how to pass more than 32kb data thru linkage section?


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

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Wed Mar 14, 2007 5:33 pm
Reply with quote

Hi All

I need help for the below situation.

I need to code one subprogram which gets required data from main program . the data to be send back is in form of 2-dimensional array.

The above array shown is part of linkage layout array (which has some other input variables also ) ..

Now due to change in business requirement we need to increase the occurs for the FIRST-WORK-TABLE from 50 TO 100 Times.

But RIGHT now for this layout the size is 30950 bytes ( I have some other variables also as part of this linkage layout)

But in linkage we can pass maximum of 32 kB of data..

If I increase the number of occur from 50 to 100 (FIRST-WORK-TABLE )? is exceeds the limit? of 32kb

Is there any hint/ solution to solve this problem?



Code:
05 ARRAY-OUTPUT.                                         
   10 FIRST-WORK-TABLE       OCCURS 50  TIMES         
                                     INDEXED BY INDEX-1.
      15 O-VECH-I        PIC S9(04) COMP.         
      15 SECOND-WORK-TABLE OCCURS 100 TIMES         
                                     INDEXED BY INDEX-2.
         20 MOD-I             PIC S9(04) COMP.         
         20 QUANTITY     PIC S9(09) COMP.     


Thanks
Shrinivas
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Mar 14, 2007 6:38 pm
Reply with quote

This type of situation can be handled using pointers.
in procedure division
SET ADDRESS OF rec-st TO rec-POINTER.

to get the address in rec-pointer you may have to write small assembly program.

Experts, please come in! icon_biggrin.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Wed Mar 14, 2007 7:33 pm
Reply with quote

shrinivas_3 wrote:
But in linkage we can pass maximum of 32 kB of data..
Please refresh my memory, but where is it written that linkage section "can pass maximum of 32 kB"?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2007 7:57 pm
Reply with quote

Hello,

Do keep in mind that no data is actually passed to the called program. The linkage section is only pointers back to the original data in the callling program.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Mar 14, 2007 8:06 pm
Reply with quote

William Thompson wrote:
shrinivas_3 wrote:
But in linkage we can pass maximum of 32 kB of data..
Please refresh my memory, but where is it written that linkage section "can pass maximum of 32 kB"?

Please read procedure division USING limit.
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed Mar 14, 2007 8:09 pm
Reply with quote

Why cant you try reading this information through SYSIN?.
You can provide the data in the sysin data set or code it instream.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2007 8:35 pm
Reply with quote

Hello,

SYSIN is for external data. The question asks about passing an array from the calling program to the called module.

A file could be created by the "caller" and read back in by the "called", but i'm not sure that is necessary.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Wed Mar 14, 2007 10:23 pm
Reply with quote

agkshirsagar wrote:
William Thompson wrote:
shrinivas_3 wrote:
But in linkage we can pass maximum of 32 kB of data..
Please refresh my memory, but where is it written that linkage section "can pass maximum of 32 kB"?

Please read procedure division USING limit.
I did not find any limitation, what did I miss?
Back to top
View user's profile Send private message
dineshness

New User


Joined: 25 Dec 2006
Posts: 63
Location: Perambalur

PostPosted: Wed Mar 14, 2007 11:29 pm
Reply with quote

If you are talking about CICS program and The data is meant to be passed through COMMAREA, then yes...there is a limit of 32KB of data that can be passed through the COMMAREA.

To avoid this you can use the CHANNEL option which allows you to pass the unlimited amount of data.

Dinesh.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Mar 15, 2007 12:02 am
Reply with quote

Hello,

The only limit i remember is if the Linkage Section data is coming from a PARM on the EXEC statement. That shouldn't be an issue here as the requirement is to "pass" an array to a called module" icon_confused.gif
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Mar 15, 2007 11:43 am
Reply with quote

Bill,
I think I interpreted it incorrectly.
I read from link which I posted earlier that..it says..

Procedure division USING identifier . . . 32,767

As Dick already said these are the actually pointers. (identifier0,identifier1....upto identifier32767)
So it means we can actually pass maximum of 32767 pointers through linkage section. (pointer takes 4 bytes 128 kb already)

Any corrections icon_question.gif

Bill and Dick, thanks for your replies. icon_biggrin.gif
Back to top
View user's profile Send private message
shrinivas_3
Warnings : 1

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Thu Mar 15, 2007 5:22 pm
Reply with quote

Thanks to all for valuable suggestions/ solutions.
But as of now as they have kept it on Hold I could not give any update from my side.

Thanks
Shrinivas
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Thu Mar 15, 2007 5:57 pm
Reply with quote

shrinivas_3 wrote:
Thanks to all for valuable suggestions/ solutions.
But as of now as they have kept it on Hold I could not give any update from my side.
Thanks for getting back.
Just remember, you do not need a solution, there is no restriction.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Mar 15, 2007 7:04 pm
Reply with quote

You're welcome. Thanks for the update.

Good luck icon_smile.gif
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 Store the data for fixed length COBOL Programming 1
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
Search our Forums:

Back to Top