How to exclude the duplicate records from two concateded
flat files (records from both files must be removed)?
Answer Posted / mayank
We can use SORT to exclude the duplicate
SORT FIELDS=NONE remove the dup from fileC
//STEP1 PGM=SORT
//*** concatinated input files
//SORTIN DD DSN=FILEA,DISP=SHR
// DD DSN=FILEB,DISP=SHR
//** output file contains records except for duplicate
//SORTOUT DD DSN=FILEC,
// DISP=(NEW,CATLG,DELETE),
// VOL=SYSDA,
// SPACES=(CYL(1,1),RLSE),
// DCB=(LRECL=80,RECFMT=F,BLKSIZE=0)
//** give the sort parameter in below sysin
//SYSIN *
SORT FIELDS=(start postion of rec, length of
rec,attribute, A/D)
SUM FIELDS=NONE
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Explain about LMQUERY�give a dialog information about a data set
Can we call instream to catalog and catalog to instream?
List the various advantages of using jcl language?
What parameter of the job statement is used to limit the cpu time consumed by the job?
What are the parameters that are used in creating a gdg?
What is notcat 2 - gs?
What is the significance of addrspc parameter in the exec statement?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
What is concatenating?
WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375
List the different jcl statements that are not permitted in the procedures?
Explain the function of //cntl statement?
What is the function of the dd avgrec keyword in sms datasets?