View previous topic :: :: View next topic
|
Author |
Message |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
Hello,
Attached to this "sticky" is a small sample program that matches/merges 2 sequential files that have been previously put "in sequence".
Depending on your exact requirement, changes may need to be made, but the overall process works for most cases. If your files have a 1-to-1 or a 1-to-many relationship, the model should work for you. One case where additional code may be needed is when both files might have duplicate key values. The issue may be how to determine how the duplicates should "sync up".
Something to keep in mind is that to keep things more manageable you do not want to code compares for multiple keys. As you read records (before any comparing) combine the "key" fields into a ws field (one for each file) so the compare does not become other than simple.
If you find a typo or a "real" error, please let me know via PM. If you prefer a different way, fine, but this is an approach that works many, many places.
I cannot emphasize enough that it is critical that you thoroughly test your version of the code before production implementation. |
|
Back to top |
|
 |
|
|
Purnendu.it
New User
Joined: 11 May 2007 Posts: 59 Location: chennai
|
|
|
|
Hi dick,
I want to inform you that the code you have is not coming in proper alignment after download.
Please can you send it in a proper alignment
Thanks in advance,
Purnendu. |
|
Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2150 Location: At my coffee table
|
|
|
|
I sometimes find that if you just save the unopened file to your PC before opening it, everything will align properly....Something about how the browser sees a txt file and how notepad sees that same file.... |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
Hello Purnendu,
As CG suggests, saving the file to your local drive will "clean it up".
Many of the attached text files do not open properly in browser windows.
Please let us know if it doesn't open properly after you right-click/save as. |
|
Back to top |
|
 |
Purnendu.it
New User
Joined: 11 May 2007 Posts: 59 Location: chennai
|
|
|
|
HI dick,
Yes its working properly.When i was downloading it was
having improper alignment but after i tried as you suggested its perfectly
alright.
Thanks |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
You're welcome
Thanks for letting us know that it worked for you. |
|
Back to top |
|
 |
hanucob
New User
Joined: 15 Jul 2008 Posts: 4 Location: bangalore
|
|
|
|
I your file is not ease for use ...its in irregular format after down loading,
please send it in correct way |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
Hello Hanu,
Please re-read the replies to this topic.
The file is easy to use if you follow the directions. . .
From earlier. . .
Quote: |
As CG suggests, saving the file to your local drive will "clean it up".
Many of the attached text files do not open properly in browser windows.
Please let us know if it doesn't open properly after you right-click/save as. |
So, if you right-click, save as and still have trouble, let us know. If you have trouble, you will be the only one who does. . . |
|
Back to top |
|
 |
ntmartins
New User
Joined: 03 Mar 2008 Posts: 12 Location: Lisboa, Portugal
|
|
|
|
Hi,
Think this sample program will be usefull to less experienced programmers.
But it does not meet most companys standards. Usage of "GO TO", for instance, instruction is not accepted in many companys.
Any way, thanks. |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Think this sample program will be usefull to less experienced programmers. |
Yes, this was to provide compilable/executable pseudo-code for learning - many training centers do not appear to teach/require the students understand this very basic process that is in every application i've ever seen.
Quote: |
But it does not meet most companys standards. Usage of "GO TO", for instance, instruction is not accepted in many companys.
|
Most companies (at least those that are well managed) have backed off of the "no go to" rule. It has been demonstrated many, many times that properly used, there is nothing wrong with a go to.
Most places that have standards concerning the use of "go to" permit this in these situations:
1. To go to the end of a routine (i.e. AT END).
2. To go to the top of a routine.
3. To go to an abend procedure.
One of the reasons for "go to less" programming was so code would be "structured". Unfortunately, no "go to"s does not guarantee well structured code. Another issue we discovered/documented "back then" was that whe programs always ran inside some PERFORMs, system paging was greatly increased.
As far as code is concerned (i've supported very many organizations whose standards greatly differ), i believe code should always work correctly, be maintainable, and not use an excessive amount of system resources. These goals can be accomplished with or without permission/prevention of "go to". |
|
Back to top |
|
 |
rbi
New User
Joined: 25 Sep 2008 Posts: 3 Location: NC
|
|
|
|
Hi,
How do I get the attached file? I can't seem to find it.
Thanks |
|
Back to top |
|
 |
rbi
New User
Joined: 25 Sep 2008 Posts: 3 Location: NC
|
|
|
|
Hi,
Don't worry about, I've found it.
thanks again. |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums,
Quote: |
How do I get the attached file? |
Quote: |
Don't worry about, I've found it. |
Yup, as soon as you post the question, there it is If you continued to dig, it would have taken longer Just the way it goes sometimes. . .
If there are any questions with the code, please post them here.
Good luck  |
|
Back to top |
|
 |
rbi
New User
Joined: 25 Sep 2008 Posts: 3 Location: NC
|
|
|
|
Hi,
The code is simple, yet effective. And I agree, GO TO statement is not to be dreaded upon. Most of the time (if used properly) it yields much better performance compared to PERFORM.
Thanks,
rbi |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
Hello,
Right-click (Save Target As) on the DOWNLOAD link on the right-side of the attachment.
This will create a text file on your pc. Upload the code to the mainframe, make changes for your specifics and run a test.
Any problems, post back here.
If you had read the topic, you would have saved yourself some time as this has been posted multiple times (in this same topic) because of others who did not read. . . |
|
Back to top |
|
 |
sunitatprasad
New User
Joined: 18 May 2006 Posts: 9
|
|
|
|
Hi,
I couldn't find the attachment.
Thanks,
Sunita |
|
Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2454 Location: @my desk
|
|
|
|
Hello,
Did you follow the steps mentioned by dick above? Are you getting any error? |
|
Back to top |
|
 |
sunitatprasad
New User
Joined: 18 May 2006 Posts: 9
|
|
|
|
Hi,
After posting the reply I'm able to see the attachment.
I downloaded it also.
Thanks,
Sunita |
|
Back to top |
|
 |
rakam.kishore
New User
Joined: 28 Mar 2008 Posts: 1 Location: hyderabad
|
|
|
|
thanq- |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
Someone will be here if there are questions,
d |
|
Back to top |
|
 |
|