Need jcl to take unmatched records count to store in dataset



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

Need jcl to take unmatched records count to store in dataset

Postby deva_048 » Thu Apr 05, 2012 12:10 pm

Am using sync sort want to compare two datasets to store result in new dataset
Dataset1:contains field contains length 3
Dataset2:contains field contains length 3

DS1:
1,308,aaaa
1,308,aaaa
1,308,aaaa
2,309,cccc
2,309,cccc
2,309,cccc
2,309,cccc

DS2:
1,308,aaaa
1,308,aaaa
2,309,cccc
2,309,cccc

I have taken the count for two datasets:
SORT FIELDS=COPY                           
 OUTFIL FNAMES=OUTPUTF1,REMOVECC,NODETAIL, 
        INCLUDE=(3,3,CH,EQ,C'308'),
TRAILER1=(1C'RECORD COUNT: ',COUNT=(M11,LENGTH=20))

OUTFIL FNAMES=OUTPUTF1,REMOVECC,NODETAIL, 
        INCLUDE=(3,3,CH,EQ,C'309'),
TRAILER1=(1C'RECORD COUNT: ',COUNT=(M11,LENGTH=20))


DS1:
Record count for 308 is 3
Record count for 309 is 4

DS2:
Record count for 308 is 2
Record count for 309 is 2

My requirement to take unmatched count to store in new dataset need jcl
ie)whole row for 308 remaining 1 record and for 309 remaining two records to store in new dataset. Please help me.Thanks in advance.
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Need jcl to take unmatched records count to store in dat

Postby deva_048 » Thu Apr 05, 2012 12:48 pm

Output should be :
1,308,aaaa
2,309,cccc
2,309,cccc

It has to be store into new dataset
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Need jcl to take unmatched records count to store in dat

Postby bodatrinadh » Thu Apr 05, 2012 1:07 pm

Deva,

What SYNCSORT version you are using ? On what key fields you want to compare?

You did not replied to my question in your previous post.

syncsort-synctool/topic7409-30.html
Subject :- Have to compare two datasets with Syncsort --- Whether this has resolved?


Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Need jcl to take unmatched records count to store in dat

Postby deva_048 » Thu Apr 05, 2012 1:14 pm

SYNCSORT FOR Z/OS 1.3.2.1R U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSORT INC.
SYNCSORT R132/ZOS INSTALLED 2009 z/OS 1.11.0
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 12AF4, MODEL 2097 502

Not yet resolved. IN (3,3) position which mentioned in above posted list
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Need jcl to take unmatched records count to store in dat

Postby bodatrinadh » Thu Apr 05, 2012 1:28 pm

I guess SYNCSORT FOR Z/OS 1.3.2.1R won't support sub tasks.

You can try this code..

//STEP1    EXEC PGM=SORT                           
//SORTJNF1 DD *                                     
1,308,AAAA                                         
1,308,AAAA                                         
1,308,AAAA                                         
2,309,CCCC                                         
2,309,CCCC                                         
2,309,CCCC                                         
2,309,CCCC                                         
//SORTJNF2 DD *                                     
1,308,AAAA                                         
1,308,AAAA                                         
2,309,CCCC                                         
2,309,CCCC                                         
//SORTOUT  DD  SYSOUT=*                             
//SYSPRINT DD SYSOUT=*                             
//SYSOUT  DD SYSOUT=*                               
//JNF1CNTL DD *                                     
  INREC OVERLAY=(51:SEQNUM,8,ZD,RESTART=(1,10))     
//JNF2CNTL DD *                                 
  INREC OVERLAY=(51:SEQNUM,8,ZD,RESTART=(1,10))
//SYSIN DD *                                   
  JOINKEYS FILE=F1,FIELDS=(1,10,A,51,8,A)       
  JOINKEYS FILE=F2,FIELDS=(1,10,A,51,8,A)       
  JOIN UNPAIRED,F1,ONLY                         
  SORT FIELDS=COPY           
  OUTFIL BUILD=(1,10,70X)


Your Output :-
1,308,AAAA 
2,309,CCCC 
2,309,CCCC 


Note :- Tested on SYNCSORT FOR Z/OS 1.4.0.1R
If it is not working in your syncsort version, switch it to ICETOOL.
Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Need jcl to take unmatched records count to store in dat

Postby bodatrinadh » Thu Apr 05, 2012 1:55 pm

Except for OUTFIL, please change all (1,10) to (3,3) as you mentioned in your post.

Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Need jcl to take unmatched records count to store in dat

Postby deva_048 » Thu Apr 05, 2012 3:04 pm

am not getting the sortout step in spool but rc=0

--RC--PGM--------STEP-----PRSTEP---PROC---
   0  SORT       STEP1                   
--------DDNAME---STEP-----PRSTEP---STAT-AC
_    1  LOG      *                       
_    2  JCL      *                       
_    3  MESSAGES *                       
_    4  SYSOUT   STEP1     
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Need jcl to take unmatched records count to store in dat

Postby deva_048 » Thu Apr 05, 2012 3:07 pm

where i need to change (3,3). Are you telling in your posted code need to change or where
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Need jcl to take unmatched records count to store in dat

Postby BillyBoyo » Thu Apr 05, 2012 3:19 pm

bodatrinadh wrote:I guess SYNCSORT FOR Z/OS 1.3.2.1R won't support sub tasks.

[...]

Note :- Tested on SYNCSORT FOR Z/OS 1.4.0.1R
If it is not working in your syncsort version, switch it to ICETOOL.
Thanks
-3nadh


Sort each of your input files on 1,10,A, doing the sequence numbering on OUTREC.

Then run your JOINKEYS step with the new inputs. Add ",SORTED" to each of the JOINKEYS statements.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Need jcl to take unmatched records count to store in dat

Postby deva_048 » Thu Apr 05, 2012 3:31 pm

will u please resubmit the jcl what need to do?
deva_048
 
Posts: 72
Joined: Thu Feb 02, 2012 9:28 pm
Has thanked: 1 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post