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

Comparing 2 sequential files using alphanumeric key


IBM Mainframe Forums -> FAQ & Basics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priya Karthik

New User


Joined: 12 Aug 2021
Posts: 2
Location: India

PostPosted: Thu Aug 12, 2021 1:02 pm
Reply with quote

I have a requirement where 2 sequential files needs to be compared using a alphanumeric key and matched records need to be written to a output file. I have seen logics where numeric keys are compared. is it possible to compare the alphanumeric in the same way as below?

Match-para:
-------------
if key1=key2
write output

if key1<key2
read inputfile1
perform match-para

if key2>key1
read inputfile2
perform match-para

Kindly help me whether i can follow the same condition checking for alphanumeric as well?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Thu Aug 12, 2021 3:52 pm
Reply with quote

You're an expert? Posting on a forum for experts?

Why the flucking hell couldn't an expert like you test it yourself?

'nuff said!
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Thu Aug 12, 2021 3:53 pm
Reply with quote

Welcome!
Moved the topic to Student forum.

I would suggest you give a try and see what happens. Besides you can do any of such operations using DFSORT much quicker than COBOL programming. Think about that too.
Back to top
View user's profile Send private message
Priya Karthik

New User


Joined: 12 Aug 2021
Posts: 2
Location: India

PostPosted: Fri Aug 13, 2021 3:53 pm
Reply with quote

I will do the testing. My requirement is not to use DFSORT and need to compare using COBOL programming.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri Aug 13, 2021 4:50 pm
Reply with quote

So then definitely you must code and try.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top