View previous topic :: View next topic
|
Author |
Message |
yasho_bala
New User
Joined: 26 Jul 2012 Posts: 4 Location: india
|
|
|
|
There are two files
FileA FileB
1 3
3 4
5 6
7 7
9 8
now i need in output file only matched records - 3 and 7 ..
and also this is jus sample input file i have given.. actual input file has 'n' number of datas//
Write matched records in file using cobol only |
|
Back to top |
|
|
rakesh1155
New User
Joined: 21 Jan 2009 Posts: 84 Location: India
|
|
|
|
I googled "File matching in cobol" and got a lot of links explaining the logic.
Here is one of them:
Link from a competitive site is removed
Also, There is tested sample code to accomplish a 2-file match/merge posted as a "Sticky" at the top of the COBOL part of the forum.
ibmmainframes.com/viewtopic.php?t=22649 |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
PS.: Rakesh - per the Forum rules I've removed one of the links from your post. If you ask, why? Well, posting such links is against Forum rules. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
yasho_bala -- have you tried something, to start with? Forget about the language used, what pseudo code will you write for it? It's a simple file-matching logic and there are plenty of example of that sort over internet and on Forums like this, as Rakesh has also indicated. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you have never written code to "match" 2 files, suggest you review the code attached to the "Sticky" at the top of the COBOL part of the forum.
Many of the examples found on the internet are incomplete or just plain wrong.
As this is such a common requirement, suggest you start with tested, working code and expand on this as needed. There is no reason to start from scratch. The code in the sticky is being used very many places.
If you have questions about something in the code, post the bit of code where you have a doubt and someone will be able to clarify. |
|
Back to top |
|
|
rakesh1155
New User
Joined: 21 Jan 2009 Posts: 84 Location: India
|
|
|
|
Anuj, I am not going to ask the question "why".
I just copy-pasted the first link that I got when I googled. Thanks for not issuing a warning for posting a link from a competitive site. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
- No problem, I usually don't issue a 'yellow-card', unless it's too compelling!
Have a nice stay here, |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
<nostalgia> Back when developers were called "Programmers", coding a two file match program, from scratch, was considered an essential part of the training process. Most people struggled when they first encountered this task, but they learned a lot in the process. Of course, some learned only that programming wasn't what they wanted to do with their careers. For others, it was quite the opposite. <\nostalgia> |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
/Perhaps On
Quote: |
Back when developers were called "Programmers" |
Over the years, the perception is also changed, I believe. In my small career, I find that, people "know languages" but they don't know "programming" and that's why they are "developers" and not called "programmers" anymore...
/Perhaps Off |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Programming has become ah, uh, umm, like work . . . And maybe we can get someone to do this for us . . .
Being a developer is more grand. . .
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Well, I generally style myself a "developer". However, this is because over the past 15-20 years I have more and more had to wear several hats simultaneously: business analyst (determine requirements), system analyst (translate requirements into design), and programmer (implement design). "Test analyst" (execute program and write report detailing defects for programmer to ignore) seems to be considered a separate role these days, although back in the day programmers took their programs through system test. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Several years ago I was successful in being hired for a contract SAS programming position.
As everyone else on the team was SAS certified, the hiring manager asked why I was not SAS certified. I replied that certification merely showed that you knew what the pieces were, but said nothing about how you put them together. To his credit, the hiring mananger liked this answer. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
we should start defining some PC ( politically correct ) terms to define these <new> figures
for example in Italy the PC name for the garbage/trash/... collector/man is "ecological operator"
along the lines that a bald man could be defined as hairbrush impaired |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
enrico-sorichetti wrote: |
for example in Italy the PC name for the garbage/trash/... collector/man is "ecological operator" |
A friend (who is a real engineer; MS, PE, specializes in coal-fired power plants) complained about the misappropriation of "engineer" to lend prestige to unskilled jobs, as with garbage collectors being called "sanitation engineers". I told her not to worry, as they were now styled "post-consumer resource analysts" |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Where I live, in Ontario, Canada, the Association of Professional Engineers regularly takes to task any organization misusing the term "engineer". Only licensed Engineers are allowed to call themselves engineers. In the most recalcitrant cases they take legal action.
One reason this distinction is important is that Engineers are legally accountable for their work. Imagine being sued for malpractice every time one of your programs abended. I would have been out of business years ago.
I am not an engineer, but am a proud father of one. |
|
Back to top |
|
|
|