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

Syncsort - Join records but key at different positions


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Jul 11, 2013 6:50 pm
Reply with quote

Hi,

Have a file with keys appearing at 25th position. Have another file with key appearing at different positions. Need to join these two files and write matched records from both the files to output but in sorted order and unmatched records to another output file. Is this possible with Syncsort?

Code:

//SORTJNF1 DD *                           
----+----1----+----2----+----3----+----4----+----5
                        ABC123           
                        BCD234           
                        CDE345           
                        DEF456           
//SORTJNF2 DD *                           
----+----1----+----2----+----3----+----4----+----5
                   FOT098                 
         ABC123                           
         ORP999                           
              BCD234                     
                   CDE345                 
              MXI019                     
                             DEF456       
                                  RFP890 



Expected Output:
Matched Records:
Code:

----+----1----+----2----+----3----+----4----+----5
         ABC123                   
                        ABC123 
              BCD234
                        BCD234
                   CDE345
                        CDE345
                        DEF456
                             DEF456


Unmatched Records:
----+----1----+----2----+----3----+----4----+----5
Code:

                   FOT098
              MXI019
         ORP999
                                  RFP890


Please help.

Thanks.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Jul 11, 2013 7:45 pm
Reply with quote

The FIELDS= parameter of each JOINKEYS is used to specify the field location and length in each of the files to be joined. Search this forum for JOINKEYS for examples.

Garry.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jul 11, 2013 8:32 pm
Reply with quote

Does your version of SYNCSORT support SQZ?
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Jul 11, 2013 9:01 pm
Reply with quote

We are at v1.3.2 but how do I get them back at the positions shown in output after SQZ !?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jul 12, 2013 5:28 am
Reply with quote

Code:
//SORTJNF1 DD *                           
A           
//SORTJNF2 DD *   
A
//JNF1CNTL DD *
  INREC OVERLAY=(1:C' ')


Put that into a simple JOINKEYS with key at position 1, length of 1.

Show the output.

This is just so we know whether you have the JNFnCNTL support from SyncSort.

Tells us how many steps you'll need to get your result.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Jul 12, 2013 1:33 pm
Reply with quote

Bill, this is what I tried........

Code:

//SORT0001 EXEC PGM=SORT           
//SYSOUT   DD SYSOUT=*             
//SORTOUT  DD SYSOUT=*             
//SORTJNF1 DD *                   
A                                 
//SORTJNF2 DD *                   
A                                 
//SYSIN    DD *                   
  OPTION COPY                     
  JOINKEYS FILES=F1,FIELDS=(1,1,A)
  JOINKEYS FILES=F2,FIELDS=(1,1,A)
  REFORMAT FIELDS=(F1:1,80)       
//JNF1CNTL DD *                   
  INREC OVERLAY=(10:C' ')         


Output:
Code:

A


SYSOUT:
Code:

********************************* TOP OF DATA **********************************
 SYNCSORT FOR Z/OS  1.3.2.2R    U.S. PATENTS: 9999999, 9999999   (C) 2007 SYNCSO
                                        XXXXXXXXXX XXXX XXXXXXX   z/OS   1.13.0
 SYNCSORT LICENSED FOR CPU SERIAL NUMBER 999Z9, MODEL 9999 Z99             LICEN
 SYSIN :                                                                       
   OPTION COPY                                                           0000610
   JOINKEYS FILES=F1,FIELDS=(1,1,A)                                      0000620
   JOINKEYS FILES=F2,FIELDS=(1,1,A)                                      0000630
   REFORMAT FIELDS=(F1:1,80)                                             0000640
 WER276B  SYSDIAG= 83170, 716950, 716950, 1262850                               
 WER164B  30,352K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER164B     0 BYTES RESERVE REQUESTED, 1,138,608 BYTES USED                   
 WER146B  12K BYTES OF EMERGENCY SPACE ALLOCATED                               
 WER481I  JOINKEYS REFORMAT RECORD LENGTH=   80, TYPE = F                       
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER410B  29,324K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER410B     0 BYTES RESERVE REQUESTED, 100K BYTES USED                         
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
 WER416B  BSAM WAS USED FOR SORTOUT                                             
 WER054I  RCD IN          1, OUT          1                                     
 WER072I  NOEQUALS, BALANCE IN EFFECT                                           
 WER169I  RELEASE 1.3 BATCH 0506 TPF LEVEL 2.2                                 
 WER482I  JNF1 STATISTICS                                                       
 WER483B  14,856K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER483B     0 BYTES RESERVE REQUESTED, 14,080K BYTES USED                     
 WER108I  SORTJNF1 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER483B  13,824K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER483B     0 BYTES RESERVE REQUESTED, 13,824K BYTES USED                     
 WER483B  G=82225                                                               
 WER484I  SORTJNF1 : RCD IN= 1,OMITTED= 0,PAIRED= 1,UNPAIRED= 0                 
 WER416B  BSAM WAS USED FOR SORTJNF1                                           
 WER487I  FILESIZE 80 BYTES                                                     
 WER482I  JNF2 STATISTICS                                                       
 WER483B  14,856K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER483B     0 BYTES RESERVE REQUESTED, 14,080K BYTES USED                     
 WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER483B  13,824K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER483B     0 BYTES RESERVE REQUESTED, 13,824K BYTES USED                     
 WER483B  G=82225                                                               
 WER484I  SORTJNF2 : RCD IN= 1,OMITTED= 0,PAIRED= 1,UNPAIRED= 0                 
 WER416B  BSAM WAS USED FOR SORTJNF2                                           
 WER487I  FILESIZE 80 BYTES                                                     
 WER052I  END SYNCSORT - JOBSORTT,SORT01,,DIAG=8C00,4248,A008,006C,C4F6,68C3,260
 WER052I  DIAG1=AE00,E045,8218,A85F,E7F6,48EB,0600,A664                         
 WER052I  DIAG2=CC00,C24B,E018,A4FD,85F6,68C3,2600,8C64                         
******************************** BOTTOM OF DATA ********************************


The data will be 1.5 and 4 million records in SORTJNF1 and SORTJNF2 respectively. So, don't know how many steps the job should have but a successful and expected output will solve it.

Thanks.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jul 12, 2013 1:58 pm
Reply with quote

OK. Gives us a "control". Now run it with 1: instead of 10:

This will tell us whether the JOINKEYS is using the JNF1CNTL file, because if it is, you will no longer get a match (because the A on F1 will have been overwritten with blank).

Code:
//SORT0001 EXEC PGM=SORT           
//SYSOUT   DD SYSOUT=*             
//SORTOUT  DD SYSOUT=*             
//SORTJNF1 DD *                   
A                                 
//SORTJNF2 DD *                   
A                                 
//SYSIN    DD *                   
  OPTION COPY                     
  JOINKEYS FILES=F1,FIELDS=(1,1,A)
  JOINKEYS FILES=F2,FIELDS=(1,1,A)
  REFORMAT FIELDS=(F1:1,80)       
//JNF1CNTL DD *                   
  INREC OVERLAY=(1:C' ')       


If the JNF1CNTL is supported, you will be able to do it in one step, as the processing required can be done there. If not, you will need more than one step.

Either way, you will need to "extend" your record to put the "floating" key into a fixed position. Then you will be able to the the JOINKEYS with that new key.

If the floating key is surrounded by space, either PARSE or SQZ/JFY will be able to get the key into position. If it is instead surrounded by data, you'll have to use IFTHENs for identifying which of the fixed-but-different positions it is in.

So, a full description will be useful. REFFMs, LRECLs, and an exact description, with sample input, of the positions that can be occupied by the floating key and whether or not there is data in the other positions, or whether it is "floating" in an area of blanks (or something else).
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Jul 12, 2013 2:13 pm
Reply with quote

sorry for the typo........in fact I tried what you said and got the same results which tells JNF1CNTL does not work with Syncsort v1.3.2.2

Code:

//JNF1CNTL DD *                   
  INREC OVERLAY=(1:C' ')


I tried below code on sample data I put in my first post and no SORTOUT is produced though job completes with MAXCC=0000 icon_exclaim.gif icon_exclaim.gif icon_exclaim.gif

Code:

//SORT0001 EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                   
//SORTOUT  DD SYSOUT=*                   
//SORTJNF1 DD *                           
                        ABC123           
                        BCD234           
                        CDE345           
                        DEF456           
//SORTJNF2 DD *                           
                   FOT098                 
         ABC123                           
         ORP999                           
              BCD234                     
                   CDE345                 
              MXI019                     
                             DEF456       
                                  RFP890 
//SYSIN    DD *                           
  OPTION COPY                             
  JOINKEYS FILES=F1,FIELDS=(25,6,A,25,6,A,25,6,A,25,6,A) 
  JOINKEYS FILES=F2,FIELDS=(10,6,A,15,6,A,20,6,A,30,6,A) 
  REFORMAT FIELDS=(F2:1,80)                               


SYSOUT:
Code:

********************************* TOP OF DATA **********************************
 SYNCSORT FOR Z/OS  1.3.2.2R    U.S. PATENTS: 9999999, 9999999   (C) 2007 SYNCSO
                                        XXXXXXXXXX XXXX XXXXXXX   z/OS   1.13.0
 SYNCSORT LICENSED FOR CPU SERIAL NUMBER 99999, MODEL 9999 999             LICEN
 SYSIN :                                                                       
   OPTION COPY                                                           
   JOINKEYS FILES=F1,FIELDS=(25,6,A,25,6,A,25,6,A,25,6,A)               
   JOINKEYS FILES=F2,FIELDS=(10,6,A,15,6,A,20,6,A,30,6,A)               
   REFORMAT FIELDS=(F2:1,80)                                             
 WER164B  30,352K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER164B     0 BYTES RESERVE REQUESTED, 1,138,608 BYTES USED                   
 WER146B  12K BYTES OF EMERGENCY SPACE ALLOCATED                               
 WER481I  JOINKEYS REFORMAT RECORD LENGTH=   80, TYPE = F                       
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER410B  29,324K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER410B     0 BYTES RESERVE REQUESTED, 100K BYTES USED                         
 WER416B  BSAM WAS USED FOR SORTOUT                                             
 WER054I  RCD IN          0, OUT          0                                     
 WER072I  NOEQUALS, BALANCE IN EFFECT                                           
 WER169I  RELEASE 1.3 BATCH 0506 TPF LEVEL 2.2                                 
 WER482I  JNF1 STATISTICS                                                       
 WER483B  14,856K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER483B     0 BYTES RESERVE REQUESTED, 14,080K BYTES USED                     
 WER108I  SORTJNF1 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER483B  13,824K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER483B     0 BYTES RESERVE REQUESTED, 13,824K BYTES USED                     
 WER483B  G=67820                                                               
 WER484I  SORTJNF1 : RCD IN= 4,OMITTED= 0,PAIRED= 0,UNPAIRED= 4                 
 WER416B  BSAM WAS USED FOR SORTJNF1                                           
 WER487I  FILESIZE 320 BYTES                                                   
 WER482I  JNF2 STATISTICS                                                       
 WER483B  14,856K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER483B     0 BYTES RESERVE REQUESTED, 14,080K BYTES USED                     
 WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    80; BLKSIZE=    80                 
 WER483B  13,824K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER483B     0 BYTES RESERVE REQUESTED, 13,824K BYTES USED                     
 WER483B  G=80239                                                               
 WER484I  SORTJNF2 : RCD IN= 8,OMITTED= 0,PAIRED= 0,UNPAIRED= 8                 
 WER416B  BSAM WAS USED FOR SORTJNF2                                           
 WER487I  FILESIZE 640 BYTES                                                   
 WER052I  END SYNCSORT - JOBSORTT,SORT0001,,DIAG=CE00,40C0,E28E,00EE,8662,68CB,A
 WER052I  DIAG1=A600,E0CF,8A9E,2057,EF62,48C3,0600,0C62                         
 WER052I  DIAG2=EE00,E0C3,C29E,2CDF,A762,48CB,0600,0462                         
******************************** BOTTOM OF DATA ********************************


Thanks.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jul 12, 2013 2:23 pm
Reply with quote

OK. You are correct, the JNFnCNTL is not supported with what you have. You may want to get your technical people to contact SyncSort support, as there is a "patch" available to give you the support.

In the mean time, or if your site does not want to install the patch, you'll have to have a separate step.

Exactly what that step does, I don't know, as you still haven't answered those bits, but in general terms it is "find the 'floating key' and make a copy of it in a fixed position in an extension to the record".

Then you do the JOINKEYS matching two single fixed keys. Then with the REFORMAT you cut off the extension and work out whether or not you matched, and use OUTFIL as appropriate.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Jul 12, 2013 3:39 pm
Reply with quote

Will there be duplicate keys within each input file?
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Jul 12, 2013 4:22 pm
Reply with quote

Hi Arun, no duplicates in 1st file as it is a db2 table dump and a PK of it is our key for join operation. 2nd file is a IMS/DB dump (twin segments may cause duplicity).

Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Jul 12, 2013 5:20 pm
Reply with quote

Bill Woodger wrote:
a full description will be useful. REFFMs, LRECLs, and an exact description, with sample input, of the positions that can be occupied by the floating key and whether or not there is data in the other positions, or whether it is "floating" in an area of blanks (or something else).
Ramsri,

Bill has already directed you in the right path, if you post the above requested info, it might help us understand your problem better
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Mon Jul 15, 2013 8:03 pm
Reply with quote

Arun, here is the sample data....first two bytes is the segment number in both the files File-1 and File-2. File-1 has the key of 6 bytes appearing at 40th column. File-2 has the key appearing at 10th, 20th, 30th, 50th and 60th positions (based on segments present). Since File-2 is missing 4th segment, it should have it got from File-1 if match key found and in sorted order.

File-1: (LRECL: 80, RECFM=FB)
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
04       TELVTOTAL 0123456789          XYZ012         MALL FINISH               
04       VOLVTOTAL 0023456789          TAN668         MALZ FINISH         @PO3FI


File-2: (LRECL: 80, RECFM=FB)
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
01       XYZ012 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
02       48ALBTIA20XYZ012000001166324800001000001166324800001XRERX VR14526000000
06       SEVE129108001012009ERRS01218.35.21.997000VERMART11XYZ012          20130
05       01980                                   XYZ012                         
03       WIER 9550           XYZ012 $@^#CIU                                     

01       VIZ913 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
06       SEV5129108001012009ERRS01918.36.22.997000PAPMAER11VIZ913          29130
03       WIER 9550           VIZ913 %@##CMU                                     
05       01980                                   VIZ913                         

05       01960                                   TAN668                         
01       TAN668 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
03       WIER 9550           TAN668 @@@@TCU                                     
06       SEV5129108001012009ERRS01918.36.22.997000OZMAITR11TAN668          29630


Expected Output:
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
01       TAN668 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
03       WIER 9550           TAN668 @@@@TCU                                     
04       VOLVTOTAL 0023456789          TAN668         MALZ FINISH         @PO3FI
05       01960                                   TAN668                         
06       SEV5129108001012009ERRS01918.36.22.997000OZMAITR11TAN668          29630

01       XYZ012 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
02       48ALBTIA20XYZ012000001166324800001000001166324800001XRERX VR14526000000
03       WIER 9550           XYZ012 $@^#CIU                                     
04       TELVTOTAL 0123456789          XYZ012         MALL FINISH               
05       01980                                   XYZ012                         
06       SEVE129108001012009ERRS01218.35.21.997000VERMART11XYZ012          20130


Thanks.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jul 15, 2013 9:20 pm
Reply with quote

ramsri,

Is it:

You have "Segment 04 records" from a DB2 table dump (F1); you have "Segment 01 through 06 records" from an IMS dump, where at least Segments 02 and 04 are optional; the "key" is in a different location depending on "Segment id".

You want to match F1 to F2 on the "key".

Key match, no 04 on F2 - what do you want output?

Key match, 04 already present on F2 - what do you want output?

Key do not match - what do you want output?
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Tue Jul 16, 2013 12:37 pm
Reply with quote

Hi,

Quote:

You have "Segment 04 records" from a DB2 table dump (F1); you have "Segment 01 through 06 records" from an IMS dump, where at least Segments 02 and 04 are optional; the "key" is in a different location depending on "Segment id".

You want to match F1 to F2 on the "key".

Key match, no 04 on F2 - what do you want output?

Key match, 04 already present on F2 - what do you want output?

Key do not match - what do you want output?


Yes......Segment 04 records are read from a DB2 table and prepared in a format suits IMS/DB.

Yes.......F1 and F2 should match on floating key.

F2 never has 04. It will be taken from F1 and should appear in sequence of segment number.

Key do not match........write them to separate files.

Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jul 16, 2013 2:43 pm
Reply with quote

Do you have blank lines in input (and expected output) after each "key-group" as shown in the example?

In file2, will a particular "group" always have the same key value for each record (at different positions according to the segment number)?

Is there any segment number (say for eg, seg - 01) which will always be present for each key in file2.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Tue Jul 16, 2013 3:26 pm
Reply with quote

Quote:

Do you have blank lines in input (and expected output) after each "key-group" as shown in the example?

In file2, will a particular "group" always have the same key value for each record (at different positions according to the segment number)?

Is there any segment number (say for eg, seg - 01) which will always be present for each key in file2.


No blank lines......To show sets of records I put it icon_rolleyes.gif
Yes.....same key for a set of records appears at diff. positions.
Segment 01 always appears in file-2.

Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jul 17, 2013 6:58 pm
Reply with quote

Ramsri,

You might want to try the below SYNCTOOL step.
Code:
//STEP01  EXEC PGM=SYNCTOOL                                           
//TOOLMSG   DD SYSOUT=*                                               
//DFSMSG    DD SYSOUT=*                                               
//IN        DD DISP=SHR,DSN= Input file1  (FB/80)                     
//          DD DISP=SHR,DSN= Input file2  (FB/80)                     
//T1        DD DISP=(NEW,PASS),UNIT=SYSDA                             
//OUT       DD SYSOUT=*                                               
//TOOLIN    DD *                                                     
  SPLICE FROM(IN) TO(T1) ON(81,6,CH) WITH(1,80) WITHALL KEEPBASE -   
                            USING(CTL1)                               
  SORT   FROM(T1) TO(OUT)   USING(CTL2)                               
//CTL1CNTL  DD *                                                     
 INREC IFTHEN=(WHEN=(1,2,ZD,EQ,1),OVERLAY=(81:10,6,X)),               
       IFTHEN=(WHEN=(1,2,ZD,EQ,2),OVERLAY=(81:20,6,X)),               
       IFTHEN=(WHEN=(1,2,ZD,EQ,3),OVERLAY=(81:30,6,X)),               
       IFTHEN=(WHEN=(1,2,ZD,EQ,4),OVERLAY=(81:40,6,C'$')),           
       IFTHEN=(WHEN=(1,2,ZD,EQ,5),OVERLAY=(81:50,6,X)),               
       IFTHEN=(WHEN=(1,2,ZD,EQ,6),OVERLAY=(81:60,6,X))               
 OUTFIL FNAMES=T1,INCLUDE=(87,1,CH,EQ,C'$')                           
//CTL2CNTL  DD *                                                     
 SORT FIELDS=(81,6,CH,A,1,2,CH,A)
 OUTFIL BUILD=(1,80)


OUT had
Code:
01       TAN668 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
03       WIER 9550           TAN668 @@@@TCU                                     
04       VOLVTOTAL 0023456789          TAN668         MALZ FINISH         @PO3FI
05       01960                                   TAN668                         
06       SEV5129108001012009ERRS01918.36.22.997000OZMAITR11TAN668          29630
01       XYZ012 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
02       48ALBTIA20XYZ012000001166324800001000001166324800001XRERX VR14526000000
03       WIER 9550           XYZ012 $@ #CIU                                     
04       TELVTOTAL 0123456789          XYZ012         MALL FINISH               
05       01980                                   XYZ012                         
06       SEVE129108001012009ERRS01218.35.21.997000VERMART11XYZ012          20130
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 17, 2013 7:44 pm
Reply with quote

Arun, its giving me results as expected......thank you very much icon_biggrin.gif

How to get unmatched records into another output file?

Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jul 17, 2013 8:21 pm
Reply with quote

ramsri wrote:
Arun, its giving me results as expected......thank you very much icon_biggrin.gif

How to get unmatched records into another output file?

Thanks.
You're welcome :-)
Unmatched records from file1 or file2?
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Wed Jul 17, 2013 8:56 pm
Reply with quote

Unmatched records from File-2 into another output file.

Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Jul 18, 2013 1:53 pm
Reply with quote

Could you try modifying the sort to add an error file(ERR DD) as shown below?
Code:
....
...
//T1        DD DISP=(NEW,PASS),UNIT=SYSDA   
//OUT       DD SYSOUT=*                     
//ERR       DD SYSOUT=*                     
...
...
//CTL1CNTL  DD *                                           
...
...
 OUTFIL FNAMES=T1,INCLUDE=(87,1,CH,EQ,C'$')               
 OUTFIL FNAMES=ERR,SAVE,BUILD=(1,80)       
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Jul 18, 2013 2:58 pm
Reply with quote

Hi,

Adding ERR has worked and writes unmatched from File-2.

Code:

01       VIZ913 XTRCT                        PGM00490  2009-07-12-21.21.06.03947
06       SEV5129108001012009ERRS01918.36.22.997000PAPMAER11VIZ913          29130
03       WIER 9550           VIZ913 %@##CMU                                     
05       01980                                   VIZ913                         


Thanks.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Jul 18, 2013 3:06 pm
Reply with quote

Thanks for letting know. icon_smile.gif
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top