Re: [U2] [UV] Where is the COMMON block reserved ?
The common block is always the same memory space: com a(100) is the same as com a(50),b(50) that's why they have labeled common com /label/ c(10) The same common blocks share the same memory space. It depends on the # of elements in the block. com /urcom/ c(10) is the same as com /urcom/ a(5),b(5) or com /urcom/ a,b,c,d,e,f,g,h,i,j where j = b(5) or c(10), and i = c(9) or b(4) - Original Message - From: "Jacques G." To: "U2 Users List" Sent: Thursday, November 19, 2009 3:01 PM Subject: Re: [U2] [UV] Where is the COMMON block reserved ? Hello, I have a question pertaining to how the shell used by the connection pooling works as it relates to memory allocation. In the following cases: Case 1: Program 1 has a number of variables and matrixes declared in a common section it calls Program 2 which has the same common matrixes and variables declared. Ex: Program 1: COM ABC(100), D,E,F ARG = "BLAH" CALL PGM2(ARG) Program 2: SUBROUTINE PGM2(ARG) COM ABC(100), D, E,F CRT ARG RETURN Case 2: Program1 doesn't have any common variables declared it calls Program2 which does have common matrixes and variables declared: Program 1: ARG = "BLAH" CALL PGM2(ARG) Program 2: SUBROUTINE PGM2(ARG) COM ABC(100), D, E,F CRT ARG RETURN In Case 2, is the common block declared in the stack segment or will the common be declared in the same place in both cases ? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [UV] Where is the COMMON block reserved ?
In the first example the common is declared in program 1 and can be used in both program 1 and the called subroutine program 2. In the second example the common is declared only when the second program is called and can only be used by the second program, and any programs called from it. In this case program 1 doesn't know of the common at all. It doesn't matter if you are using connection pooling. Jerry Banker -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jacques G. Sent: Thursday, November 19, 2009 2:02 PM To: U2 Users List Subject: Re: [U2] [UV] Where is the COMMON block reserved ? Hello, I have a question pertaining to how the shell used by the connection pooling works as it relates to memory allocation. In the following cases: Case 1: Program 1 has a number of variables and matrixes declared in a common section it calls Program 2 which has the same common matrixes and variables declared. Ex: Program 1: COM ABC(100), D,E,F ARG = "BLAH" CALL PGM2(ARG) Program 2: SUBROUTINE PGM2(ARG) COM ABC(100), D, E,F CRT ARG RETURN Case 2: Program1 doesn't have any common variables declared it calls Program2 which does have common matrixes and variables declared: Program 1: ARG = "BLAH" CALL PGM2(ARG) Program 2: SUBROUTINE PGM2(ARG) COM ABC(100), D, E,F CRT ARG RETURN In Case 2, is the common block declared in the stack segment or will the common be declared in the same place in both cases ? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] [UV] Where is the COMMON block reserved ?
Hello, I have a question pertaining to how the shell used by the connection pooling works as it relates to memory allocation. In the following cases: Case 1: Program 1 has a number of variables and matrixes declared in a common section it calls Program 2 which has the same common matrixes and variables declared. Ex: Program 1: COM ABC(100), D,E,F ARG = "BLAH" CALL PGM2(ARG) Program 2: SUBROUTINE PGM2(ARG) COM ABC(100), D, E,F CRT ARG RETURN Case 2: Program1 doesn't have any common variables declared it calls Program2 which does have common matrixes and variables declared: Program 1: ARG = "BLAH" CALL PGM2(ARG) Program 2: SUBROUTINE PGM2(ARG) COM ABC(100), D, E,F CRT ARG RETURN In Case 2, is the common block declared in the stack segment or will the common be declared in the same place in both cases ? ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users