duplicate data processing in jcl using esds file



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

duplicate data processing in jcl using esds file

Postby Savita » Sat Apr 03, 2010 1:38 am

Hi,
I have esds file1:
10 10000
11 50000
12 40000
13 90000

another esds file2:
16 10000
18 90000
20 40000
21 26000

I want output esds file like:
10 10000
16 10000
11 50000
12 40000
20 40000
13 90000
18 90000
21 26000

the second field is repeating and i want the same field to come one after in the output file.
Can anyone tell me how i can sort these record using sot/icetool utility keeping second duplicate field in sequence.
In the above example the first field is non repeating even if the second fields gets duplicates in second file.
the ascending or descending sequence is not important.
Savita
 
Posts: 7
Joined: Wed Aug 19, 2009 11:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: duplicate data processing in jcl using esds file

 

Re: duplicate data processing in jcl using esds file

Postby dick scherrer » Sat Apr 03, 2010 1:44 am

Hello and welcome to the forum,

Your output appears to be in no sequence at all. . . :?

Please more clearly explain the "rules".

Why can you not simply concatenate the 2 input files and sort on the second field?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: duplicate data processing in jcl using esds file

Postby Savita » Sat Apr 03, 2010 1:54 am

Thanks for the quick reply..
when I am trying to sort using sort utility on second field I am getting error like: "OUT OF SEQ" with maxcc 16.
Is it because of duplicates..when i tried with no duplicates it works fine..but my requirement is for second duplicate field to be in sequence.
In the previous example sequence in not important I mean I just want to have second field similar record one after another..if there is no duplication of second field then that record may appear before or after the bunch of repeated one.
Savita
 
Posts: 7
Joined: Wed Aug 19, 2009 11:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: duplicate data processing in jcl using esds file

Postby dick scherrer » Sat Apr 03, 2010 1:59 am

Hello,

when I am trying to sort using sort utility on second field I am getting error like: "OUT OF SEQ" with maxcc 16.
Post the jcl, control statements, and the complete diagnostic information generated when the job was run.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: duplicate data processing in jcl using esds file

Postby Savita » Sat Apr 03, 2010 2:07 pm

Hi,

My JCL is:

//STEP002  EXEC PGM=SORT                                     
//SORTIN01 DD DSN=file1,DISP=SHR               
//SORTIN02 DD DSN=file2,DISP=SHR               
//SORTOUT  DD DSN=outfile,                         
//          DISP=(NEW,CATLG,DELETE),                         
//          RECORG=ES,SPACE=(CYL,(500,500),RLSE),LRECL=4096
//SYSOUT   DD SYSOUT=*                                       
//SYSIN DD *     
  MERGE FIELDS=(24,10,CH,A)
/*


at 24 second fiels gets start having length 10

Following is the error:
WER068A OUT OF SEQ SORTIN01 , BLOCK 2
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000

My file sortin01 file is similar wih differnt data which i shown in the above example.

I tried another approach which works fine:
1) in first step: I merged the 2 files on 1st field which is having no duplication
2) in second step: I sort the merged file on second field which is having duplication with control statement shown above with sort field.

But I am wondered why its not doing sorting and merging in one go with 2nd field as control.
Savita
 
Posts: 7
Joined: Wed Aug 19, 2009 11:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: duplicate data processing in jcl using esds file

Postby dick scherrer » Sat Apr 03, 2010 8:22 pm

Hello,

Using 2 steps is not a "works fine". Using 2 steps and multiple passes of the data just wastes system resources.

When using MERGE the files should already be in sequence by the key(s).

Suggest you now run what i suggested earlier - concatenate both input files into a sort(not a merge) and you will get what you want with only one pass of the input, only 1 setp of jcl and dd statements to maintain, and the output will "grouped" by the second field.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: duplicate data processing in jcl using esds file

Postby Savita » Mon Apr 05, 2010 2:28 pm

Hi,
When I am concatenating both vsam files , error which i got is: concatenation is not allowed in VSAM,
Can u please suggest the code which can help me to resolve the problem.
Savita
 
Posts: 7
Joined: Wed Aug 19, 2009 11:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: duplicate data processing in jcl using esds file

Postby dick scherrer » Mon Apr 05, 2010 11:25 pm

Sorry - i forgot about the files being vsam. . .

You could sort both files separately and then merge them or you might COPY them to sequential files and sort them at the same time using concatenation for the qsam files.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: duplicate data processing in jcl using esds file

Postby Alissa Margulies » Tue Apr 06, 2010 12:07 am

Savita,

We can help you out. Please contact me offline at alissa.margulies@syncsort.com in regards to concatenating VSAM files.

Regards,
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post