Need help on sort



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

Need help on sort

Postby kiran_wiproblr » Mon Feb 20, 2012 5:07 pm

Hi,

Can some one help me out?

The below are the my 2 input files and expected out files

Can some one provide sort card?


Input File-1
----+----1----+----2----+----3----+-
11111 XXXX
22222 XXXX
33333 XXXX
44444 XXXX

Input File-2
----+----1
AAAA
BBBB
CCCC
DDDD

expected out files
----+----1----+----2---
11111 AAAA XXXX
22222 BBBB XXXX
33333 CCCC XXXX
44444 DDDD XXXX
kiran_wiproblr
 
Posts: 21
Joined: Fri Feb 10, 2012 11:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help on sort

 

Re: Need help on sort

Postby NicC » Mon Feb 20, 2012 6:17 pm

What have you tried so far? Have you looked at the manual yet? Have you looked at the forum yet? Try searching on joinkeys.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Need help on sort

Postby bodatrinadh » Mon Feb 20, 2012 8:47 pm

Kiran..

here is your code

//JK1       EXEC PGM=SORT                         
//SYSOUT    DD SYSOUT=*                           
//SYSPRINT  DD SYSOUT=*                           
//SORTJNF1  DD *                                 
11111 XXXX                                       
22222 XXXX                                       
33333 XXXX                                       
44444 XXXX                                       
//SORTJNF2  DD *                                 
AAAA                                             
BBBB                                             
CCCC                                             
DDDD                                             
//SORTOUT   DD SYSOUT=*                           
//SYSIN     DD *                                 
  JOINKEYS FILES=F1,FIELDS=(30,8,A),SORTED       
  JOINKEYS FILES=F2,FIELDS=(30,8,A),SORTED       
  REFORMAT FIELDS=(F1:1,10,F2:1,5)               
  OPTION COPY                                     
  OUTREC FIELDS=(1:1,5,X,11,4,X,7,4)             
//JNF1CNTL DD *                     
  INREC OVERLAY=(30:SEQNUM,8,BI)     
//JNF2CNTL DD *                     
  INREC OVERLAY=(30:SEQNUM,8,BI)     
//*                                 


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 help on sort

Postby kiran_wiproblr » Mon Feb 20, 2012 9:29 pm

Hi Bodatrinadh,

Plz help me out.....
expected O/P is
----+----1----+----2---
11111 AAAA XXXX
22222 BBBB XXXX
33333 CCCC XXXX
44444 DDDD XXXX


BUT obtained O/P is

11111 AAAA XXXX
11111 BBBB XXXX
11111 CCCC XXXX
11111 DDDD XXXX
22222 AAAA XXXX
22222 BBBB XXXX
22222 CCCC XXXX
22222 DDDD XXXX
33333 AAAA XXXX
33333 BBBB XXXX
33333 CCCC XXXX
33333 DDDD XXXX
44444 AAAA XXXX
44444 BBBB XXXX
44444 CCCC XXXX
44444 DDDD XXXX
kiran_wiproblr
 
Posts: 21
Joined: Fri Feb 10, 2012 11:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help on sort

Postby BillyBoyo » Mon Feb 20, 2012 10:03 pm

To stand any chance, we'd need to see your JCL, sort cards, and output messages (the WER stuff) from the sort step.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Need help on sort

Postby kiran_wiproblr » Mon Feb 20, 2012 11:05 pm

Hi BillyBoyo,

below are the JCL and SYSOUT message
==============================
//JK1       EXEC PGM=SORT                 
//SYSOUT    DD SYSOUT=*                   
//SYSPRINT  DD SYSOUT=*                   
//SORTJNF1  DD *                           
11111 XXXX                                 
22222 XXXX                                 
33333 XXXX                                 
44444 XXXX                                 
//SORTJNF2  DD *                           
AAAA                                       
BBBB                                       
CCCC                                       
DDDD                                       
//SORTOUT   DD SYSOUT=*                   
//SYSIN     DD *                           
  JOINKEYS FILES=F1,FIELDS=(30,8,A),SORTED
  JOINKEYS FILES=F2,FIELDS=(30,8,A),SORTED
  REFORMAT FIELDS=(F1:1,10,F2:1,5)         
  OPTION COPY                             
  OUTREC FIELDS=(1:1,5,X,11,4,X,7,4)       
//JNF1CNTL DD *                           
  INREC OVERLAY=(30:SEQNUM,8,BI)           
//JNF2CNTL DD *                           
  INREC OVERLAY=(30:SEQNUM,8,BI)           
//*                             


SYSOUT message
********************************* TOP OF DATA **********************************
 SYNCSORT FOR Z/OS  1.3.2.0R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                    xxxxxxxxxxx                       z/OS   1.1
 SYNCSORT LICENSED FOR CPU SERIAL NUMBER XXXXX, MODEL XXXXX             LICEN
 SYSIN :                                                                       
   JOINKEYS FILES=F1,FIELDS=(30,8,A),SORTED                                     
   JOINKEYS FILES=F2,FIELDS=(30,8,A),SORTED                                     
   REFORMAT FIELDS=(F1:1,10,F2:1,5)                                             
   OPTION COPY                                                                 
   OUTREC FIELDS=(1:1,5,X,11,4,X,7,4)                                           
 WER901I  **WARNING** SYNCSORT 1.3.2.0 WILL EXPIRE IN 50 DAYS                   
 WER481I  JOINKEYS REFORMAT RECORD LENGTH=   15, TYPE = F                       
 WER237I  OUTREC RECORD LENGTH =    15                                         
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    15; BLKSIZE=    15                 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
 WER054I  RCD IN         16, OUT         16                                     
 WER072I  EQUALS, BALANCE IN EFFECT                                             
 WER169I  RELEASE 1.3 BATCH 0494 TPF LEVEL 2.0                                 
 WER482I  JNF1 STATISTICS                                                       
 WER108I  SORTJNF1 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER484I  SORTJNF1 : RCD IN= 4,OMITTED= 0,PAIRED= 4,UNPAIRED= 0                 
 WER482I  JNF2 STATISTICS                                                       
 WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER484I  SORTJNF2 : RCD IN= 4,OMITTED= 0,PAIRED= 4,UNPAIRED= 0                 
******************************** BOTTOM OF DATA ********************************
kiran_wiproblr
 
Posts: 21
Joined: Fri Feb 10, 2012 11:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help on sort

Postby bodatrinadh » Mon Feb 20, 2012 11:38 pm

My sysout msg is showing 4 records in output.

SYNCSORT FOR Z/OS  1.4.0.1R    U.S. PATENTS: 4210961, 5117495   (C) 2010 SYNCS
                                            XXXXXXXXXXXX   z/OS   1.12.0   
SYNCSORT LICENSED FOR CPU SERIAL NUMBER XXXXX, MODEL XXXX XXX             LICE
SYSIN :                                                                       
  JOINKEYS FILES=F1,FIELDS=(30,8,A),SORTED                                   
  JOINKEYS FILES=F2,FIELDS=(30,8,A),SORTED                                   
  REFORMAT FIELDS=(F1:1,10,F2:1,5)                                           
  OPTION COPY                                                                 
  OUTREC FIELDS=(1:1,5,X,11,4,X,7,4)                                         
WER276B  SYSDIAG= 207413, 501019, 501019, 1458450                             
WER164B  14,372K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER164B     64K BYTES RESERVE REQUESTED, 1,164K BYTES USED                   
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER481I  JOINKEYS REFORMAT RECORD LENGTH=   15, TYPE = F                     
WER237I  OUTREC RECORD LENGTH =    15                                         
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    15; BLKSIZE=    15                 
WER074I  SORTOUT  : DSNAME=B1CDTB2.OUTPUT1.JOB26637.D0000108.?             
WER410B  13,280K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE, 
WER410B     0 BYTES RESERVE REQUESTED, 160K BYTES USED                     
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                             
WER416B  BSAM WAS USED FOR SORTOUT                                         
WER054I  RCD IN          4, OUT          4                                 
WER072I  EQUALS, BALANCE IN EFFECT                                         
WER169I  RELEASE 1.4 BATCH 0518 TPF LEVEL 0.1                             
WER482I  JNF1 STATISTICS                                                   
WER483B  1,780K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,         
WER483B     0 BYTES RESERVE REQUESTED, 1,164K BYTES USED                   
WER108I  SORTJNF1 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80             
WER073I  SORTJNF1 : DSNAME=B1CDTB2.OUTPUT1.JOB26637.D0000101.?             
WER483B  748K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
WER483B     0 BYTES RESERVE REQUESTED, 160K BYTES USED                     
WER484I  SORTJNF1 : RCD IN= 4,OMITTED= 0,PAIRED= 4,UNPAIRED= 0   
WER416B  BSAM WAS USED FOR SORTJNF1                                           
WER482I  JNF2 STATISTICS                                                     
WER483B  1,780K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER483B     0 BYTES RESERVE REQUESTED, 1,164K BYTES USED                     
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
WER073I  SORTJNF2 : DSNAME=B1CDTB2.OUTPUT1.JOB26637.D0000102.?               
WER483B  748K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,       
WER483B     0 BYTES RESERVE REQUESTED, 160K BYTES USED                       
WER484I  SORTJNF2 : RCD IN= 4,OMITTED= 0,PAIRED= 4,UNPAIRED= 0               
WER416B  BSAM WAS USED FOR SORTJNF2                                           
WER052I  END SYNCSORT - OUTPUT1,JK1,,DIAG=E200,6086,CA00,00C6,AAFE,4C8B,8A48,4
WER052I  DIAG1=E600,6086,CA00,0046,AEFE,488B,0E48,44E4                       
WER052I  DIAG2=C600,4086,EA00,0066,8EFE,688B,2E48,44E4                                 




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 help on sort

Postby bodatrinadh » Mon Feb 20, 2012 11:51 pm

i think, SYNCSORT FOR Z/OS 1.3.2.0R won't support sub-tasks.

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 help on sort

Postby kiran_wiproblr » Mon Feb 20, 2012 11:59 pm

Hi Bodatrinadh

Then is there any other way to get output as I need,as explained above.

Plz help me.
kiran_wiproblr
 
Posts: 21
Joined: Fri Feb 10, 2012 11:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help on sort

Postby BillyBoyo » Tue Feb 21, 2012 4:57 am

bodatrinadh wrote:i think, SYNCSORT FOR Z/OS 1.3.2.0R won't support sub-tasks.

Thanks
-3nadh


Do you mean it is not processing the statements in the CNTL files?

kiran_wiproblr,

The output you get seems to imply you have nothing in the sequence numbers, so they are all the same, so the join matches each four times.

If you put sequence numbers onto both of your input files in seperate steps, then run the joinkeys step, you should get the expected output. Consult your Syncsort documentation to confirm that JOINKEYS does not use the CNTL files. If this is so, you have to use this work-around until you get an upgrade of Syncsort which does support them. Tell your boss. If your Syncsort does support the CNTL files, I have no idea why it doesn't work, but the work-around should.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post