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

How File Matching works in EasyTrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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
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
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

Moderator Emeritus


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

PostPosted: Tue Jun 19, 2007 1:31 pm
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 All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts IGYPG3178-I when compiling a pgm read... COBOL Programming 6
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
Search our Forums:


Back to Top