|
|
| Author |
Message |
ermanisharora
New User
Joined: 10 Apr 2007 Posts: 7 Location: mumbai
|
|
|
|
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 |
|
 |
References
|
Posted: Fri May 09, 2008 1:18 pm Post subject: Re: Can indexed table be used in linkage section? |
 |
|
|
 |
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 168 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: mumbai
|
|
|
|
| Thanks Gautam for the clarification..... |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1200 Location: At my desk
|
|
|
|
| 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: 1200 Location: At my desk
|
|
| Back to top |
|
 |
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 498 Location: Richmond, Virginia
|
|
|
|
| Why not just try and see? |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8058 Location: 221 B Baker St
|
|
|
|
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: mumbai
|
|
|
|
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: 498 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
Senior Member
Joined: 20 Oct 2006 Posts: 1524 Location: germany
|
|
|
|
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 |
|
 |
|
|