Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sudheer648

New 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

sangiah

New User


Joined: 10 Jun 2005
Posts: 62

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

New 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: 17

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

New 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

New User


Joined: 10 Jun 2005
Posts: 62

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

New 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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us