Compare flat file with partial key



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

Compare flat file with partial key

Postby Sudh_varma » Thu Apr 18, 2013 7:23 pm

I Have two flat files with LREC as 10. Fixed Block files. If account number matches then it should check status, if any mismatch in status then create an output file with account number and status field from both files.

Input File 1:

ACCT-Number Status
---------------- --------
111111111 A
222222222 C
333333333 A
555555555 P

Input File 2:

ACCT-Number Status
---------------- --------
111111111 A
222222222 A
333333333 A
444444444 P
555555555 S
666666666 R


OUTPUT

ACCT-Number Status from inputfile-1 Status from inputfile 2
---------------- --------------------------- -------------------------
222222222 C A
555555555 P S

Could any one help please me with SORT card for this...

Thanks,
Sudh
Sudh_varma
 
Posts: 3
Joined: Thu Apr 18, 2013 6:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare flat file with partial key

Postby BillyBoyo » Thu Apr 18, 2013 9:16 pm

Looks like a JOINKEYS is needed.

Can you please run this step and post the full sysout so that we can determine whether your level of SORT supports JOINKEYS.

//S1 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
JUST SOME ARBITRARY TEXT
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Compare flat file with partial key

Postby Sudh_varma » Thu Apr 18, 2013 9:31 pm

SYNCSORT LICENSED FOR CPU SERIAL
SYSIN :
OPTION COPY
WER276B SYSDIAG= 491388, 935929, 935929, 1652025
WER164B 6,384K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 332K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER073I SORTIN : DSNAME=AVE9182.AVE91821.JOB28951.D0000101.?
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER074I SORTOUT : DSNAME=NULLFILE
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 216K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B BSAM WAS USED FOR SORTIN
Sudh_varma
 
Posts: 3
Joined: Thu Apr 18, 2013 6:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare flat file with partial key

Postby BillyBoyo » Thu Apr 18, 2013 9:41 pm

Thanks.

OK, so you have SyncSort and your chopped off the release details. Can you post the part which says 1.3.something or 1.4.something, please. The topic will be moved to the SyncSort part of the forum shortly.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Compare flat file with partial key

Postby Sudh_varma » Thu Apr 18, 2013 9:46 pm

SYNCSORT FOR Z/OS 1.4.0.1R U.S. PATENTS: 4210961, 5117495 (C) 2010 SYNCSO

SYNCSORT LICENSED FOR CPU SERIAL NUMBER C3E92, MODEL 2097 406 LICEN
SYSIN :
OPTION COPY
WER276B SYSDIAG= 491388, 935929, 935929, 1652025
WER164B 6,384K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 332K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER073I SORTIN :
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER074I SORTOUT : DSNAME=NULLFILE
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 216K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B BSAM WAS USED FOR SORTIN
Sudh_varma
 
Posts: 3
Joined: Thu Apr 18, 2013 6:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare flat file with partial key

Postby BillyBoyo » Thu Apr 18, 2013 10:08 pm

OK, you are quite current.

Have a search for JOINKEYS. You can specify the key from your two files, and then produce a REFORMAT with the data you need, then OUTFIL INCLUDE and BUILD for selecting the data and producing your final output.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post