IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

ACCEPT/REJECT from ADABAS point of view.

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> NATURAL & MQSERIES
View previous topic :: View next topic  
Author Message
atulrukmangad



Joined: 10 Apr 2006
Posts: 13

Posted: Fri Apr 28, 2006 1:54 pm    Post subject: ACCEPT/REJECT from ADABAS point of view.  

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  
monasu1998



Joined: 23 Dec 2005
Posts: 96
Location: Hyderabad

Posted: Fri Apr 28, 2006 3:15 pm    Post subject: Re: ACCEPT/REJECT from ADABAS point of view.  

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  
naveen_desireddy



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

Posted: Tue May 23, 2006 2:00 am    Post subject:  

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  
vasanthanc



Joined: 01 Apr 2005
Posts: 59

Posted: Sun May 28, 2006 2:05 am    Post subject:  

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  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> NATURAL & MQSERIES
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM