MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Indicator variable with array

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Tue Aug 08, 2006 1:10 am    Post subject: Indicator variable with array Reply with quote

I have a indicator variables for one of the table like below

Code:

*****************************************************************
 01  IOCORDHV.                                                   
     10 INDSTRUC           PIC S9(4) USAGE COMP OCCURS 151 TIMES.
*****************************************************************


In my fetch statement i am selecting only two columns fro the table.

Now if i want to use , indicator variable , what will be the syntax , The below are the syntax i tried but i am getting error





Code:

 EXEC SQL                                                 
   FETCH ABC_CURS1 INTO                                   
         :DCLOCORDHV.ORDNUM,                               
         :DCLOCORDHV.ORDTYP,                               
         :DCLOCORDHV.PROCESSCOMPIND3:IOCORDHV.INDSTRUC(36),
         :DCLOCORDHV.PROCESSDTE7:IOCORDHV.INDSTRUC(49)     
 END-EXEC.                                                 


Code:

EXEC SQL                                                 
   FETCH ABC_CURS1 INTO                                   
         :DCLOCORDHV.ORDNUM,                               
         :DCLOCORDHV.ORDTYP,                               
         :DCLOCORDHV.PROCESSCOMPIND3:INDSTRUC(36),
         :DCLOCORDHV.PROCESSDTE7:INDSTRUC(49)     
 END-EXEC.       



The above two clumns for which the indicator is used are 36th and 49th cloumns.

How the syntax will be??. I read the link given in this forum , but there the entire columns are read and moved to the entire sturcutre of Indicator variable.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Aug 08, 2006 5:31 am    Post subject: Reply with quote

mainframemouli,


Indicator variable or Host variable ? Going by the question it should be Host variable.

Any ways you cannot select a column in to occurance in an array. Work around is shown here

http://www.mvsforums.com/helpboards/viewtopic.php?p=31537#31537

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group