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
 

 

EASYTRIVE matching logic issue

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

New User


Joined: 20 Jan 2004
Posts: 42

PostPosted: Fri Dec 14, 2007 3:26 pm    Post subject: EASYTRIVE matching logic issue
Reply with quote

Hi,

I have coded an easytrive code which uses MATCH logic using keys from file1 and file2...

Logic is follows..

JOB INPUT key (file1 key1, file2 key2))

IF matched
do nothing
ELSE
if file1
move the values from file1 to WS variables
write output-file
end-if
END-IF


the problem here is i am getting a output with records matching in both files.

can anybody help me out to overcome this issue?

thanks
shakti
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Dec 14, 2007 3:28 pm    Post subject:
Reply with quote

shakti,

Post your actual code. Remember to use CODE tags.
Back to top
View user's profile Send private message
shakti

New User


Joined: 20 Jan 2004
Posts: 42

PostPosted: Fri Dec 14, 2007 3:41 pm    Post subject:
Reply with quote

murmohk1 wrote:
shakti,

Post your actual code. Remember to use CODE tags.


This is my actual code

FILE INPUT1
INPUT1-IN 1 29 A
I-STATE-ID 1 02 A
I-XREF-ACCOUNT 03 17 A
I-INSTITUTION-ID 20 01 A
I-FILL-SPACE 21 07 A
I-XREF-STATUS 28 02 A


FILE INPUT2
INPUT2-IN 1 99 A
I-PA-APPL-ID 1 9 A
I-PA-TYPE 10 6 A
I-PA-TR 16 9 N
I-PA-RE-TR 25 5 P
I-PA-RE-ACCT 30 17 A
I-PA-DA-POINT 47 9 N
I-PA-AR-POINT 56 9 N
I-PA-DT-COLL 65 8 P
I-PA-BILL-TR 73 5 P
I-PA-BILL-AT 78 17 A
I-PA-STATS-TYPE 95 5 A

REPT-REC W 153 A
O-PA-APPL REPT-REC 9 A
FILLER1 REPT-REC +9 1 A VALUE ';'
O-PA-TYPE REPT-REC +10 6 A
FILLER2 REPT-REC +16 1 A VALUE ';'
O-PA-TR REPT-REC +17 9 N
FILLER3 REPT-REC +26 1 A VALUE ';'
O-RECG-TR REPT-REC +27 9 N
FILLER4 REPT-REC +36 1 A VALUE ';'
O-RECG-ACCT REPT-REC +37 17 A
FILLER5 REPT-REC +54 1 A VALUE ';'
O-VSM-STATUS REPT-REC +55 2 A
FILLER6 REPT-REC +57 1 A VALUE ';'
O-VSM-STATE REPT-REC +58 2 A
FILLER7 REPT-REC +60 1 A VALUE ';'
O-VSM-ACCT-TYPE REPT-REC +61 5 A
FILLER8 REPT-REC +66 1 A VALUE ';'
O-BILL-ACCT REPT-REC +67 17 A
FILLER9 REPT-REC +84 1 A VALUE ';'
O-BILL-TR REPT-REC +85 9 A
FILLER10 REPT-REC +94 1 A VALUE ';'
O-BILL-STATUS REPT-REC +95 2 A
FILLER11 REPT-REC +97 1 A VALUE ';'
O-BILL-STATUS-TYPE REPT-REC +98 5 A
FILLER12 REPT-REC +103 1 A VALUE ';'
O-SITE REPT-REC +104 2 A
FILLER13 REPT-REC +106 1 A VALUE ';'
O-AR-DA-PT REPT-REC +107 9 N
FILLER14 REPT-REC +116 1 A VALUE ';'
O-DIST-OVERRIDE-PT REPT-REC +117 15 N
FILLER15 REPT-REC +132 1 A VALUE ';'
O-LAST-DATE-COLL REPT-REC +133 15 N
FILLER16 REPT-REC +148 1 A VALUE ';'
O-LOCATED-ON-CED REPT-REC +149 4 A

JOB INPUT (INPUT2 KEY(I-PA-RE-ACCT), INPUT1 KEY(I-XREF-ACCOUNT))

IF MATCHED
DISPLAY 'I AM MATCHED'
ELSE
IF INPUT2
O-PA-APPL = I-PA-APPL-ID
O-PA-TYPE = I-PA-TYPE
O-PA-TR = I-PA-TR
O-RECG-TR = I-PA-RE-TR
O-RECG-ACCT = I-PA-RE-ACCT
O-VSM-ACCT-TYPE = I-PA-STATS-TYPE
O-BILL-ACCT = I-PA-BILL-AT
O-BILL-TR = I-PA-BILL-TR
O-BILL-STATUS = 'NF'
O-SITE = 'TX'
O-AR-DA-PT = I-PA-AR-POINT
* O-DIST-OVERRIDE-PT = XXXXXXXXXXXXX
O-LAST-DATE-COLL = I-PA-DT-COLL
O-LOCATED-ON-CED = ' '
DISPLAY 'I AM NOT MATCHED'
OTPUT1-OUT = REPT-REC
PUT OTPUT1
OTPUT2-OUT = REPT-REC
PUT OTPUT2
END-IF
END-IF
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Dec 14, 2007 9:10 pm    Post subject:
Reply with quote

It looks like you did not post all of the code. Where did you define OTPUT1-OUT and OTPUT2-out? I assume that these are 2 output files.
Why are writing the same record to both output files? Or did you mean to have and ELSE and more moves between "OTPUT2-OUT = REPT-REC " and "PUT OTPUT1".
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 Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts Matching and unmatching records scdinesh DFSORT/ICETOOL 11 Tue Feb 07, 2017 12:41 am
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


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