View previous topic :: View next topic
|
Author |
Message |
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi,
Can we Send the Index as a Parameter while calling another Program. |
|
Back to top |
|
|
sangiah
New User
Joined: 10 Jun 2005 Posts: 62
|
|
|
|
Yes index variables can be part of a communication area |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
hi sangiah,
Are you sure of it.Subscript can be sent as a parameter can index as can be sent as parmeter while calling another prg. |
|
Back to top |
|
|
Sangita
New User
Joined: 02 Jun 2005 Posts: 17
|
|
|
|
Hi Sudheer,
I don't think we can pass index as parameter as index is not defined in the working storage of the program so cannot be passed through
linkage.
Please corect me if I am wrong.
Regards,
Sangita |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi Sangita,
I know that we cannot pass Index as a parameter.But i want views of all Folks about the same. |
|
Back to top |
|
|
sangiah
New User
Joined: 10 Jun 2005 Posts: 62
|
|
|
|
Here is the example
05 WS-OCCURS PIC 999 OCCURS 10 TIMES
INDEXED BY WS-IDX.
05 WS-SUB USAGE IS INDEX.
PROCEDURE DIVISION
SET WS-IDX UP BY 1.
MOVE 100 TO WS-OCCURS(WS-IDX)
SET WS-SUB TO WS-IDX
pass WS-SUB in the communication area of calling program. |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi Sangiah,
Quote: |
Here is the example
05 WS-OCCURS PIC 999 OCCURS 10 TIMES
INDEXED BY WS-IDX.
05 WS-SUB USAGE IS INDEX.
PROCEDURE DIVISION
SET WS-IDX UP BY 1.
MOVE 100 TO WS-OCCURS(WS-IDX)
SET WS-SUB TO WS-IDX
pass WS-SUB in the communication area of calling program. |
Can we Pass WS-SUB in the Communication Area????? |
|
Back to top |
|
|
|