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 

Validation on data entered on map

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
adarsh444
Beginner


Joined: 19 Sep 2006
Posts: 13
Topics: 9

PostPosted: Sat Mar 10, 2007 1:12 pm    Post subject: Validation on data entered on map Reply with quote

I have to validate Customer and the code ranges entered by user on the map defined as an array.
WS-CUST-NAME(X(30)) occurs 20 times.
WS-FROM-CODE(X(04)) occurs 20 times.
WS-FROM-CODE(X(04)) occurs 20 times

Ex:Custname Fromcode - Tocode
HOLSON 0001 1000

Need to find the duplicates entered on map
a) No Duplicate customer and code are allowed.
i.e. If HOLSON 0010 - 0050 is entered on map elsewhere it should throw message 'Dup not allowed'. it would be gr8 if anyone can help me
in handling this logic.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Mar 12, 2007 3:29 am    Post subject: Reply with quote

What is wrong with:
Code:

do i = 1 to 19
   do j = 2 to 20
      if var(i) = var(j) then errormsg
   next j
next i
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Mon Mar 12, 2007 2:55 pm    Post subject: Reply with quote

do j=i+1 to 20 - otherwise it will always fail when i=j
Back to top
View user's profile Send private message Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Mar 13, 2007 3:51 am    Post subject: Reply with quote

oh so true! Exclamation
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware 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