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: 1316
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: 3076
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: 3076
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 3 files concatenated to 1 DFSORT/ICETOOL 2
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files and write Matched/Unm... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top