View previous topic :: View next topic
|
Author |
Message |
shrinivas_3 Warnings : 1 New User
Joined: 05 Sep 2006 Posts: 34
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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! |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dineshness
New User
Joined: 25 Dec 2006 Posts: 63 Location: Perambalur
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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" |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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
Bill and Dick, thanks for your replies. |
|
Back to top |
|
|
shrinivas_3 Warnings : 1 New User
Joined: 05 Sep 2006 Posts: 34
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome. Thanks for the update.
Good luck |
|
Back to top |
|
|
|