Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Can We Send Index as a Parameter while calling another PROG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
sudheer648

Active User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 10:51 am    Post subject: Can We Send Index as a Parameter while calling another PROG
Reply with quote

Hi,

Can we Send the Index as a Parameter while calling another Program.
Back to top
View user's profile Send private message
References
sangiah

Active User


Joined: 10 Jun 2005
Posts: 64

PostPosted: Thu Jun 16, 2005 11:23 am    Post subject: Re: Can We Send Index as a Parameter while calling another P
Reply with quote

Yes index variables can be part of a communication area
Back to top
View user's profile Send private message
sudheer648

Active User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 11:36 am    Post subject: Re: Can We Send Index as a Parameter while calling another P
Reply with quote

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
View user's profile Send private message
Sangita

New User


Joined: 02 Jun 2005
Posts: 13

PostPosted: Thu Jun 16, 2005 2:32 pm    Post subject: Re: Can We Send Index as a Parameter while calling another P
Reply with quote

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
View user's profile Send private message
sudheer648

Active User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 2:55 pm    Post subject: Re: Can We Send Index as a Parameter while calling another P
Reply with quote

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
View user's profile Send private message
sangiah

Active User


Joined: 10 Jun 2005
Posts: 64

PostPosted: Thu Jun 16, 2005 3:36 pm    Post subject: Re: Can We Send Index as a Parameter while calling another P
Reply with 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.
Back to top
View user's profile Send private message
sudheer648

Active User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 4:30 pm    Post subject: Re: Can We Send Index as a Parameter while calling another P
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1