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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: how to pass more than 32kb data thru linkage section?
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: 686
Location: Earth

PostPosted: Wed Mar 14, 2007 6:38 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Mar 14, 2007 7:33 pm    Post subject: Re: how to pass more than 32kb data thru linkage section?
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

Site Director


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

PostPosted: Wed Mar 14, 2007 7:57 pm    Post subject:
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: 686
Location: Earth

PostPosted: Wed Mar 14, 2007 8:06 pm    Post subject: Re: how to pass more than 32kb data thru linkage section?
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    Post subject:
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

Site Director


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

PostPosted: Wed Mar 14, 2007 8:35 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Mar 14, 2007 10:23 pm    Post subject: Re: how to pass more than 32kb data thru linkage section?
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    Post subject:
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

Site Director


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

PostPosted: Thu Mar 15, 2007 12:02 am    Post subject:
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: 686
Location: Earth

PostPosted: Thu Mar 15, 2007 11:43 am    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Thu Mar 15, 2007 5:57 pm    Post subject:
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

Site Director


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

PostPosted: Thu Mar 15, 2007 7:04 pm    Post subject:
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    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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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