IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ACCEPT/REJECT from ADABAS point of view.


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
atulrukmangad

New User


Joined: 10 Apr 2006
Posts: 13

PostPosted: Fri Apr 28, 2006 1:54 pm
Reply with quote

What is the difference b/w following 2 codes

READ PRODUCT WITH PRODUCT-CODE
IF PRODUCT-CODE NE '1000'
ESCAPE TOP
END-IF
<expressions>
END-READ

READ PRODUCT WITH PRODUCT-CODE
ACCEPT IF PRODUCT-CODE EQ '1000'
<expressions>
END-READ
Back to top
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Fri Apr 28, 2006 3:15 pm
Reply with quote

Hi:

Below 2 code block read scan thru a view. The significance in 2nd code block (ACCEPT statement) is it is used with a SORT statement. Where records those satisfy the condition after ACCEPT keyword will be taken for SORTing.

ACCEPT/REJECT keywords are used in conjustion with SORT statement.


READ PRODUCT WITH PRODUCT-CODE
IF PRODUCT-CODE NE '1000'
ESCAPE TOP
END-IF
<expressions>
END-READ

READ PRODUCT WITH PRODUCT-CODE
ACCEPT IF PRODUCT-CODE EQ '1000'
<expressions>
END-READ[/quote]
Back to top
View user's profile Send private message
naveen_desireddy

New User


Joined: 29 Aug 2005
Posts: 10
Location: Hyderabad, India

PostPosted: Tue May 23, 2006 2:00 am
Reply with quote

if records exist with EMPLOY-ID = '3' within the first 10 READS, then they will be written because:

"If an ACCEPT condition is satisfied, the record will be accepted and consecutive ACCEPT/REJECT statements will be ignored."
Back to top
View user's profile Send private message
vasanthanc

New User


Joined: 01 Apr 2005
Posts: 58

PostPosted: Sun May 28, 2006 2:05 am
Reply with quote

Quote:
What is the difference b/w following 2 codes


Both the code will give same result. No difference at all. As far as adabas is concerned, both the code will retrieve all records after that the condition will be checked and rejected based on that. So efficieny wise also both are same
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Point and Shoot )PTNS TSO/ISPF 0
No new posts SET PATH in View DDL DB2 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Issues with VIEW DATASET Command CLIST & REXX 2
No new posts Difference when accessing dataset in ... JCL & VSAM 7
Search our Forums:

Back to Top