I'm trying to learn to use the MERGE application of SYNCSORT as I need to give a presentation about it. I usually just use SORT and COPY. Can someone tell me why one would prefer to use MERGE instead of SORT or COPY?
Additionally, I tried to run a similar JCL below but encountered a WER068A OUT OF SEQ SORTIN02 , BLOCK 1 error. I looked it up from the manual and found the following explanation: "A record in the SORTIN data set indicated by xx is out of sequence according to the FIELDS specification on the MERGE statement.". I checked the contents of my SORTIN02 but couldn't work out which record could be out of sequence and/or why. Can someone help, please.
Kindly note that all my input files are VB.
sample JCL:
==========
//JS010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTOUT DD DSN=PMERCOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(20,20),RLSE),
// DCB=(RECFM=VB,LRECL=374,BLKSIZE=0)
//*
//SORTIN01 DD DISP=SHR,DSN=PMERCIN1
//SORTIN02 DD DISP=SHR,DSN=PMERCIN2
//SORTIN03 DD DISP=SHR,DSN=PMERCIN3
//SYSIN DD *
MERGE FIELDS=(5,6,CH,A)
/*
//SYSOUT DD SYSOUT=*
//SORTOUT DD DSN=PMERCOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(20,20),RLSE),
// DCB=(RECFM=VB,LRECL=374,BLKSIZE=0)
//*
//SORTIN01 DD DISP=SHR,DSN=PMERCIN1
//SORTIN02 DD DISP=SHR,DSN=PMERCIN2
//SORTIN03 DD DISP=SHR,DSN=PMERCIN3
//SYSIN DD *
MERGE FIELDS=(5,6,CH,A)
/*
first 8 characters of the two records of SORTIN02:
==========================================
SPR000\.!
SPRABC\RU