View previous topic :: View next topic
|
Author |
Message |
ermanisharora
New User
Joined: 10 Apr 2007 Posts: 7 Location: Good-gaon
|
|
|
|
I read somewhere that indexed table cannot be used in the linkage section since the value of index is held by a register.
Corrections are welcome!!!! |
|
Back to top |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
if you are talking about the problem in passing the index of a table declared in the main-program to the sub-program, then it is not possible. you can pass those variables through the LINKAGE SECTION which you have declared in the WORKING-STORAGE SECTION and the INDEX is not declared by the programmer in the WORKING-STORAGE SECTION. |
|
Back to top |
|
|
ermanisharora
New User
Joined: 10 Apr 2007 Posts: 7 Location: Good-gaon
|
|
|
|
Thanks Gautam for the clarification..... |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
the_gautam wrote: |
if you are talking about the problem in passing the index of a table declared in the main-program to the sub-program, then it is not possible. you can pass those variables through the LINKAGE SECTION which you have declared in the WORKING-STORAGE SECTION and the INDEX is not declared by the programmer in the WORKING-STORAGE SECTION. |
But a usage index item can be set to an implicitly defined index and passed via linkage..... |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Why not just try and see? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Why not just try and see? |
And please post the result of the experiment here |
|
Back to top |
|
|
ermanisharora
New User
Joined: 10 Apr 2007 Posts: 7 Location: Good-gaon
|
|
|
|
Hi All,
I tried to use an indexed table in the linkage area of a program and it worked fine.
Conclusively, we can use an indexed table in the linkage section of a program but we cannot implicitly pass the value to this index from the calling program.
Please correct me if I my understanding is wrong!!!! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
That would make sense. I note your use of "implicitly." Passing another variable with the index value SET to it works explicitly. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can not explictly pass the value -
but you can set a numeric item to the index, pass the numeric item and the set the index to the numeric item in the called module - which would be implicitly passing. |
|
Back to top |
|
|
|