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

compare 2 files and create 3 output files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Wed Nov 28, 2007 6:05 pm
Reply with quote

Hi,

I have the following requirement....

I am having 2 files file1 and file2 and I have to compare these two files and I have to copy the data to the output datasets as follows:

1. Matching records from file1 file2 to the first output file.
2. Records which are in file1 and NOT in file2 to the second output file.
3. Records which are NOT in file1 and in file2 to the second output file.

Strictly I have to use SORT only.....preferably using DFSORT...ICETOOL is also OK.....

Please let me know the procedure.......

Thx in advance.....

pavan
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Wed Nov 28, 2007 6:14 pm
Reply with quote

Pavan,

Discussed many times. Search DFSORT forum.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 28, 2007 10:10 pm
Reply with quote

pavan,

You can use the technique discussed in the "Create files with matching and non-matching records" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Thu Nov 29, 2007 6:34 pm
Reply with quote

hi murmohk1

I tried to find the solution....but not able to...

can you send exact link.....so that it will be helpful for me...

pavan
[/b]
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Nov 29, 2007 6:47 pm
Reply with quote

Pavan,

Did you check the link that Frank had posted?
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Fri Nov 30, 2007 2:50 pm
Reply with quote

HI Aaru,

I saw Frank's link....it is saying to use ICETOOL....

But, I am restricted to use ICETOOL......

Hence, I am requesting you all please let me know whether this can be done using SORT.......



Thx in advance....

pavan
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Nov 30, 2007 3:03 pm
Reply with quote

Just being picky :-)

in the O/P you said that ICETOOL was OK!

another curiosity..
for what reason Your organization prevents people from using something they paid for??
By using ICETOOL you cannot do more damage then using SORT!
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Nov 30, 2007 5:33 pm
Reply with quote

enrico-sorichetti wrote:
Just being picky :-)

in the O/P you said that ICETOOL was OK!

another curiosity..
for what reason Your organization prevents people from using something they paid for??
By using ICETOOL you cannot do more damage then using SORT!

I find you asking this question repeatedly....
here are some reasons why they wouldnt have encouraged...
(based on my experience)
    The senior people in the project who are not aware of or not in the interest to learn these stuffs at that age...they would encourage using progrms which will be english like language; any one can quickly pick up the logic...

    When we have the ICETOOL steps in the PROC's(we cant have the inline control cards), if we have TOOLIN card and one CP01, CP02..... cards.. then we need to have those many cataloged members.. this makes not to have the logic at one place....
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Nov 30, 2007 10:03 pm
Reply with quote

Quote:
The senior people in the project who are not aware of or not in the interest to learn these stuffs at that age...they would encourage using progrms which will be english like language; any one can quickly pick up the logic...


Huh? How does this apply to DFSORT vs DFSORT's ICETOOL?

If somebody is not interested in learning stuff, then he/she wouldn't be interested in learning any of the new stuff in DFSORT (IFTHEN, OVERLAY, PARSE, etc) any more than he/she would be interested in learning ICETOOL. Note that DFSORT's ICETOOL has been around for a long, long time (since 1991).

And it could certainly be argued that DFSORT's ICETOOL actually has more English-like syntax than DFSORT.

Also, I'd suggest that the fact that somebody is a "senior person" doesn't generally have much relevance to whether they want to learn stuff. People either want to learn stuff or don't depending on their personality, not their age.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Nov 30, 2007 10:55 pm
Reply with quote

Quote:
If somebody is not interested in learning stuff, then he/she wouldn't be interested in learning any of the new stuff in DFSORT (IFTHEN, OVERLAY, PARSE, etc)

Yes, they are not aware of IFTHEN, OVERLAY, PARSE.... as well...
Quote:
Also, I'd suggest that the fact that somebody is a "senior person" doesn't generally have much relevance to whether they want to learn stuff.
Some people would like to learn functional(domain) as time goes rather than technical...

.... because of all these reasons... though i have learnt/suggested n number of ICETOOL solutions here(forum), there is not even one production JOB that runs ICETOOL in our project icon_redface.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Dec 01, 2007 10:54 am
Reply with quote

Krisprem,

Quote:
though i have learnt/suggested n number of ICETOOL solutions here(forum), there is not even one production JOB that runs ICETOOL in our project


Yes, i agree the use is limited and most of them are not aware of the same icon_sad.gif . But the scenerio is different now. Knowing the significance of the product its our responsibility to make our jobs use the same. I have made many production jobs to run ICETOOL from the day i started learning DFSORT/ICETOOL.
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Mon Dec 03, 2007 8:24 am
Reply with quote

Hi All,

Thank you for your quick responces.....

krisprems:
Yes....I told that ICETOOL is ok.....but, after posting the question I enquired with my teammates and I had given search in my libraries....I didn't find single SORT with ICETOOL......then I realized that I have to use SORT only....

Aaru:
FYI.....I am open to learn any things....but my situation is restricting to use SORT only.......


I hope you all understood my problem...

FYI..........I know the forum rules and I am being the member since quite some time.......

Regards,
Pavan
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Dec 03, 2007 8:28 am
Reply with quote

Pavan,

Quote:
Yes....I told that ICETOOL is ok.....but, after posting the question I enquired with my teammates and I had given search in my libraries....I didn't find single SORT with ICETOOL......then I realized that I have to use SORT only....

ICETOOL is shipped with DFSORT utility. Verify which sort product is installed in your shop (DF/SYNC). If you are using DFSORT, then you can use the example cited by Frank. Trust me it works.
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Dec 03, 2007 8:37 am
Reply with quote

Krisprems,

This is not at all related to the OP, but need to know few things -

Quote:
The senior people in the project who are not aware of or not in the interest to learn these stuffs at that age...they would encourage using progrms which will be english like language; any one can quickly pick up the logic...

How do you define 'senior people in the project'? People who are there in project for 'n' years or according to the "person's age".

Quote:
When we have the ICETOOL steps in the PROC's(we cant have the inline control cards), if we have TOOLIN card and one CP01, CP02..... cards.. then we need to have those many cataloged members.. this makes not to have the logic at one place....

Override the control cards from the job (again project standards has to permit this, but assuming its permitted)
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Mon Dec 03, 2007 11:51 am
Reply with quote

hi murmohk1,

I enquired only SYNCSORT is installed in my shop....

Regards,
kumar
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Tue Dec 04, 2007 2:07 pm
Reply with quote

i413678 wrote:
only SYNCSORT


/* rudeness On
Well, if you are in business you would like to get your work done with minimal resources..so word 'only' is bit strong in this context..you can do all the things required in Mainframes with your 'only' product..
/* rudeness Off

At least try the code given, ICETOOL is aliased to SYNCTOOL on SyncSort sites, not all but many facilities of ICETOOL are available with SYNCTOOL as well.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Dec 04, 2007 7:24 pm
Reply with quote

Pavan,

I had earlier posted on the same topic stating that this can be accomplished using JOINKEYS/UNPAIRED of SYNCSORT. Did you try searching for those keywords in this forum?

My 2 posts on this topics were removed. One asking pavan to use JOINKEYS and other with the links of similar topics.

Moderators,

Is my suggestion wrong? Can't we use JOINKEYS of SYNCSORT for this requirement? Please advise and correct me if am wrong.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Dec 04, 2007 9:44 pm
Reply with quote

Quote:
Is my suggestion wrong? Can't we use JOINKEYS of SYNCSORT for this requirement? Please advise and correct me if am wrong.


The topic was originally posted in the DFSORT Forum which is for discussion of DFSORT so I removed the references to Syncsort. The OP later stated that he had Syncsort, not DFSORT at which point I moved this thread to the JCL Forum. The JCL Forum is the proper place for discussion of Syncsort and you can post here accordingly.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Dec 04, 2007 10:38 pm
Reply with quote

I find it interesting that they are not allowed to use ICETOOL but they are allowed to use SORT, and SORT isn't even a program name.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Dec 04, 2007 10:39 pm
Reply with quote

i413678 wrote:
I am having 2 files file1 and file2 and I have to compare these two files and I have to copy the data to the output datasets as follows:

1. Matching records from file1 file2 to the first output file.
2. Records which are in file1 and NOT in file2 to the second output file.
3. Records which are NOT in file1 and in file2 to the second output file.

Pavan,
You indicated that the records from your 2nd and 3rd requirements are to be written to the second output file - was this a typo, because the title of the thread states that you want 3 output files?
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 -> JCL & VSAM

 


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 REXX/CMS How to place command console... CLIST & REXX 4
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
Search our Forums:

Back to Top