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 

table handling

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


Joined: 30 Jun 2006
Posts: 3
Topics: 2

PostPosted: Wed Jul 05, 2006 1:37 pm    Post subject: table handling Reply with quote

I got an array(10) of names to be displayed.I got to check the duplicates
and needs to display error. does the below logic work.
Code:

 PERFORM VARYING WS-CNT FROM 1 BY 1 UNTIL WS-CNT > 10     
      ADD NUM-1  TO WS-CNT GIVING WS-CNT2                                 
     PERFORM VARYING WS-CNT1 FROM  WS-CNT2 BY 1             
                                  UNTIL  WS-CNT1 > 10       
       IF WS-ARRAY(WS-CNT1)  = SPACES 
             CONTINUE                                       
       ELSE                                                 
         IF WS-ARRAY(WS-CNT1) = WS-ARRAY(WS-CNT2)       
         IF WS-ARRAY(WS-CNT1) NOT = SPACES               
           DISPLAY 'DUPLICATE RECORD FOUND' 
          END-IF                                             
         END-IF                                             
       END-PERFORM                                           
   END-PERFORM
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jul 05, 2006 2:16 pm    Post subject: Reply with quote

shailesh,

You can run a test for yourself. Any way why do you think checking for Not equal to spaces will give you the duplicates? Your logic will NOT work

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 -> Application Programming 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