View previous topic :: View next topic
|
Author |
Message |
Shivendu
New User
Joined: 20 Feb 2009 Posts: 14 Location: Workstation
|
|
|
|
Need to compare data in two files FILE1 and FILE2. Data which is present ONLY in FILE2 should be written to a new file FILE3 (i.e removing
duplicates)
Both files have same format and rec length.
Need to do thru SORT only (or NATURAL) and not ICETOOL as its not available here. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Shivendu wrote: |
and not ICETOOL as its not available here. |
How did you conclude this? Which SORT product is installed at your shop? If Sync Sort what version of that? |
|
Back to top |
|
|
Shivendu
New User
Joined: 20 Feb 2009 Posts: 14 Location: Workstation
|
|
|
|
Coz I tried with ICETOOL and its not working.
It's a bit urgent. |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Quote: |
Coz I tried with ICETOOL and its not working |
As anuj said could you let us know which sort product is installed in your shop with the version? |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Quote: |
and not ICETOOL as its not available here. |
What is the pgm name you used for sort? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
just take a decision,
ICETOOL not available, or You made mistakes in using it
not working is just blaming somebody else for one' s errors
did You search the forums with , for exampe "sort duplicates"
I am sure that You will find many hints on how to proceed
and what info to post in order to get better help |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
This
Quote: |
and not ICETOOL as its not available here. |
and this
Quote: |
Coz I tried with ICETOOL and its not working |
are totally different wordings...in a crude sense...if something is not working is from "application programmer's" point of view and something is not available is to do with "system programmers"... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
To start with, you can try this JCL:
Code: |
//**************************************************************
//*THIS JCL WILL GIVE THREE OUTPUTS: OUT12,OUT1 & OUT2
//*OUT12: OUTPUT-FILE WITH COMMON RECORDS IN TWO INPUT-FILES.
//*OUT1 : OUTPUT-FILE WITH RECORDS ONLY IN INPUT IN1 NOT IN IN2.
//*OUT2 : OUTPUT-FILE WITH RECORDS ONLY IN INPUT IN2 NOT IN IN1.
//* ONE NEED TO CHANGE THE KEY-LENGTH WHILE USING JCL.
//*CHANGE KEY LENGTH IN 'ON(1,3,CH)'
//**************************************************************
//*
//STEP001 EXEC PGM=ICETOOL/SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
111 $$$$$
111 $$$$$
222 AAAAA
333 FFFFF
444 GGGGG
555 CCCCC
666 $$$$$
777 AAAAA
888 FFFFF
999 GGGGG
999 GGGGG
999 GGGGG
999 GGGGG
/*
//IN2 DD *
111 BBBBB
333 DDDDD
444 FFFFF
555 HHHHH
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),
// DISP=(MOD,PASS)
//OUT12 DD DSN=XXXXXX.MATCHED.OUTPUT,DISP=(NEW,CATLG,DELETE)
//OUT1 DD DSN=XXXXXX.ONLY.IN.IN1.OUT,DISP=(NEW,CATLG,DELETE)
//OUT2 DD DSN=XXXXXX.ONLY.IN.IN2.OUT,DISP=(NEW,CATLG,DELETE)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT12) ON(1,3,CH) WITH(81,1) -
USING(CTL3) KEEPNODUPS
/*
//CTL1CNTL DD *
INREC OVERLAY=(80:C'11')
/*
//CTL2CNTL DD *
INREC OVERLAY=(80:C'22')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT12,INCLUDE=(80,2,CH,EQ,C'12'),BUILD=(1,80)
OUTFIL FNAMES=OUT1,INCLUDE=(80,2,CH,EQ,C'11'),BUILD=(1,80)
OUTFIL FNAMES=OUT2,INCLUDE=(80,2,CH,EQ,C'22'),BUILD=(1,80)
/* |
"eidted" |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Hi Anuj,
Code: |
STEP001 EXEC PGM=ICECTOOL/ |
Will this work? |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Hi Shivendu,
If
is not working you can trying using
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
By this:
Code: |
PGM=ICECTOOL/SYNCTOOL |
I meant code either one of these based on the product he has on his shop . . . though on Synsort shops ICETOOL will invoke SYNTOOL.
If you dont keep that "/" in below code, this
himanshu7 wrote: |
Code: |
STEP001 EXEC PGM=ICECTOOL/ |
|
should work. |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Quote: |
I meant code either one of these based on the product he has on his shop . |
But Syncsort has any PGM=ICECTOOL?
Or it should be PGM=ICETOOL? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
himanshu7 wrote: |
If
is not working you can trying using
|
I wish Frank is not looking in this thread . . . |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
himanshu7 wrote: |
But Syncsort has any PGM=ICECTOOL? |
Yeah spell check time for me, it should be ICETOOL - I wrote this code on the fly..so . . . |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Quote: |
I wish Frank is not looking in this thread . . . |
Please clarify, is there anything wrong?
As in our shop we are using Syncsort whcih is giving RC 20 for ICETOOL but RC 0 for the same ICEMAN sorting. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
himanshu7 wrote: |
As in our shop we are using Syncsort whcih is giving RC 20 for ICETOOL but RC 0 for the same ICEMAN sorting. |
Did you really execute the job as posted? When you run it using ICEMAN it would expect DD names like SORTIN, SORTOUT and SYSIN and they are not there in the job in question. . .
Which version of Sync Sort you are using at your shop? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Hi Anuj,
We are using Syncsort..
Code: |
SYNCSORT FOR Z/OS 1.3.1. |
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Then the job should work with ICETOOL or SYNCTOOL as posted . . . |
|
Back to top |
|
|
Shivendu
New User
Joined: 20 Feb 2009 Posts: 14 Location: Workstation
|
|
|
|
Quick help needed...
Code: |
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,13,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(3519:C'1')
/*
//CTL2CNTL DD *
INREC OVERLAY=(3519:C'2')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(3519,1,CH,EQ,C'2'),
BUILD=(1,3518)
/* |
IN1
Code: |
1001789877AQ1 1
1001910140AQ1 1
1001910140AQ1 2 |
IN2
Code: |
1001789794AQ1 1
1001789877AQ1 1
1001910140AQ1 1
1001910140AQ1 2 |
OUTPUT i m gettng is
But I want
Code: |
1001789794AQ1 1
1001910140AQ1 1
1001910140AQ1 2 |
[/code] |
|
Back to top |
|
|
Shivendu
New User
Joined: 20 Feb 2009 Posts: 14 Location: Workstation
|
|
|
|
Quick help needed...
Code: |
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,13,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(3519:C'1')
/*
//CTL2CNTL DD *
INREC OVERLAY=(3519:C'2')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(3519,1,CH,EQ,C'2'),
BUILD=(1,3518)
/* |
IN1
IN2
Code: |
1001789794AQ1 1
1001789877AQ1 1
1001910140AQ1 1
1001910140AQ1 2 |
OUTPUT i m gettng is
But I want (whatever is in IN2 but not in IN1)
Code: |
1001789794AQ1 1
1001910140AQ1 1
1001910140AQ1 2 |
[/code][/quote] |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Plz customize and use the below code...
Code: |
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//SSMSG DD SYSOUT=*
//FILEA DD DSN=DGCVPG2.V831.LISTDSN.FILTER2,DISP=SHR
//FILEB DD DSN=DGCVPG2.V831.LISTDSN.FILTER4,DISP=SHR
//FILEC DD DSN=DGCVPG2.REGION.DELTA,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(15,15)),
// DISP=(MOD,PASS)
//TOOLIN DD *
COPY FROM(FILEB) TO(T1) USING(CTL1)
COPY FROM(FILEA) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(FILEC) ON(1,40,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(65:C'B')
/*
//CTL2CNTL DD *
INREC OVERLAY=(65:C'A')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=FILEC,INCLUDE=(65,1,CH,EQ,C'B'),
BUILD=(1,64)
/* |
|
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
IN1 is fileA
IN2 is FileB
FileC is Delta file.... |
|
Back to top |
|
|
Shivendu
New User
Joined: 20 Feb 2009 Posts: 14 Location: Workstation
|
|
|
|
Did the same ....problem is whatever is duplicate (1-13 bytes) in IN2 (though not present in IN1) is not getting writen in output. |
|
Back to top |
|
|
himanshu7
Active User
Joined: 28 Aug 2007 Posts: 131 Location: At Desk
|
|
|
|
Hi Shivendu
Quote: |
Did the same ....problem is whatever is duplicate (1-13 bytes) in IN2 (though not present in IN1) is not getting writen in output. |
The above code is tested in my system and working fine. |
|
Back to top |
|
|
|