Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How File Matching works in EasyTrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
r-a-v-i

New User


Joined: 30 Apr 2007
Posts: 4
Location: Hyderabad

PostPosted: Sat Jun 16, 2007 12:08 pm    Post subject: How File Matching works in EasyTrieve
Reply with quote

Hi,
can any one tell me how the file matching works in EasyTrieve.
that is, the file matching crieteria.

FILE DRIVER FB(2 0)
A-RECORD 1 2 A
A-KEY1 1 1 A
A-KEY2 2 1 N

FILE DRIVEN FB(2 0)
B-RECORD 1 2 A
B-KEY1 1 1 A
B-KEY2 2 1 N

JOB INPUT (DRIVER KEY(A-KEY1 A-KEY2) +
DRIVEN KEY(B-KEY1 B-KEY2))
IF DRIVER
WS-MESSAGE = A-RECORD
DISPLAY WS-MESSAGE
END-IF

i have written a small prog to match two files. the contents of these files are :
Driver :
A1
A2
A3

Driven :
A1
A1
A1
A1
A6
A7

what is the output in this case and how that comes ?

Thank You very much...
Back to top
View user's profile Send private message

IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Mon Jun 18, 2007 3:16 pm    Post subject: Re: How File Matching works in EasyTrieve
Reply with quote

If you have written the program, why don't you run it to see what the output is?

Only then if you have any further queries, ask.
Back to top
View user's profile Send private message
r-a-v-i

New User


Joined: 30 Apr 2007
Posts: 4
Location: Hyderabad

PostPosted: Tue Jun 19, 2007 1:04 pm    Post subject:
Reply with quote

Thanks for the Reply.

i ran the program, and the output is :

A1
A1
A1
A1
A2
A3

Here, i don't understand how the file matching works ?

in the prog, i specified the condtion "IF DRIVER". this means, only records in Driver file should come. so, the output should be "A1 A2 A3".

but, in the actual output "A1" is repeated 4 times.

can you explain me the flow of the program.

Thank you,
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 19, 2007 1:31 pm    Post subject:
Reply with quote

Hello,

Why should all occurrences of A1 not be placed in the output file? What code would prevent this?

I believe this is not quite what your code says
Quote:
i specified the condtion "IF DRIVER". this means, only records in Driver file should come.
I believe your code says that if the value is in the DRIVER or matches the DRIVER, display the A-RECORD.

You will want to verify that in the manual which is available from CA if your organization is licensed.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us