Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to use Read/Find statment....

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
purushottam

New User


Joined: 26 Feb 2007
Posts: 37
Location: pune

PostPosted: Mon Mar 02, 2009 8:37 pm    Post subject: How to use Read/Find statment....
Reply with quote

To speed up the process I am planning to use the super descriptor in READ/FIND statement.

Super descriptor ===>> NUM-LOC-STUS-ITEM-TYPE (A15)
which consist of
NUM ( N9)
LOC (A4)
STATUS (A1)
ITEM-TYPE (A1)

Here I want to read the record only if it satisfy the condition like

NUM = 123456789 -555555555 (Entire range) ===>> Here I can use Starting From
LOC = 9999
STATUS = A
ITEM-TYPE = A OR B OR C (means more than one value) ==>> Here I need help

I want to use above all 4 conditions in READ loop only (No IF check's) Can any one please guide me how to do it in NATURAL
Back to top
View user's profile Send private message

beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Tue Mar 03, 2009 1:22 pm    Post subject:
Reply with quote

Why do you not want to club if with the read/find...because it will be the easiest way to perform this.

Do you think there is any other way...of doing this other than if ?

Pls Share

Regards
Beruoist
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Mar 03, 2009 3:36 pm    Post subject:
Reply with quote

If the values of ITEM-TYPE are consecutive (like A-D, G-Z etc.), then you can use STARTING FROM - ENDING AT clauses. If not, you might want to consider ACCEPT/REJECT statements.

O.
Back to top
View user's profile Send private message
purushottam

New User


Joined: 26 Feb 2007
Posts: 37
Location: pune

PostPosted: Tue Mar 03, 2009 6:38 pm    Post subject: Reply to: How to use Read/Find statment....
Reply with quote

Thanks for your reply...

The values of ITEM-TYPE are not consecutive values are 'L' OR 'R' OR 'Y' OR '6' OR '8' OR '9', also i found in manuals that ACCEPT/REJECT criterion is evaluated after the record has been selected/read. So i am not sure whether it is equvalent to IF condition (time taken to complete the process will be the same) ???

If no other ways then i would opt for 4 seprate read/find loops.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Mar 03, 2009 6:57 pm    Post subject:
Reply with quote

From the logic point of view - ACCEPT/REJECT are exactly like IF. From the performance point of view - ACCEPT/REJECT are slightly more efficient then IF, as Natural processes the record internally without waiting for IF. In any case, for huge file processing, it is not recommended to use ACCEPT/REJECT, and separate READs are a totally accepted solution.

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us