Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
No new posts Calling CLIST through job and REXX Sahasra K CLIST & REXX 19 Tue Aug 01, 2017 10:25 am
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us