what is the sortcard for comparing two files with a field key
and get the duplicates in onefile and noduplicates in another
file

Answers were Sorted based on User's Feedback



what is the sortcard for comparing two files with a field key and get the duplicates in onefile and..

Answer / sv

sort fields = copy
sum fields = none,xsum

Is This Answer Correct ?    12 Yes 3 No

what is the sortcard for comparing two files with a field key and get the duplicates in onefile and..

Answer / arthi

JOINKEYS F1=FILE1,FIELDS=(1,10,A)
JOINKEYS F2=FILE2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,10,F2:1,10)
INREC IFTHEN=(WHEN(1,10,CH,NE,11,10,CH),OVERLAY=(22:C'N'))
OUTFIL FNAMES=MATCHED,INCLUDE=(22,1,CH,EQ,C'B')
OUTFIL FNAMES=UNMATCHED,INCLUDE=(22,1,CH,EQ,C'N')

Is This Answer Correct ?    4 Yes 0 No

what is the sortcard for comparing two files with a field key and get the duplicates in onefile and..

Answer / vinodh

Refining the above sort card statement after executing it

SORT FIELDS=COPY
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,10,F2:1,10)
INREC IFTHEN=(WHEN(1,10,CH,NE,11,10,CH),OVERLAY=(22:C'N'))
OUTFIL FNAMES=MATCH,INCLUDE=(22,1,CH,EQ,C' ')
OUTFIL FNAMES=UNMATCH,INCLUDE=(22,1,CH,EQ,C'N')

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More JCL Interview Questions

In jcl i have 255 steps. In 255 step i declared proc. In proc i have 20 steps this job is executable or not? why?

4 Answers  


how to do automated restart when a job abends?

0 Answers   IBM,


What are the common jcl syntax errors you get? This is not abends?

1 Answers  


FOR a GDG, the book by 'SABA ZAMEER' says 'We can NOT ALTER the LIMIT parameter after it is defined'. (p-211). But many persons have written that it can be changed, which one is true ?

4 Answers   IBM,


What is the use of disp parameter?

0 Answers  






What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?

3 Answers   IBM,


what JCL Procedures?

0 Answers  


How to delete AIX ? i) IEBGENER ii) IDCAMS iii) PURGE iv) All of the above

3 Answers   HSBC,


A dd statement consists of 4 fields. Name them?

0 Answers  


Hi, I have 3 files say file A , file B and file C.I want to form an output file in which i will have all the records from file A. Files B and C also may contain records that are present in file A.I want those records also to be included in my output file. for eg: file A contains: 1 2 3 file B contains: 2 4 5 file C contains: 1 3 5 So in my output file should look like: 1 2 3 2 1 3 Can any one help ???.....thanks in advance.

2 Answers  


If i have defined an temperory dataset in step2, how can i call back or use the same dataset in step5 of the same job

4 Answers   UST,


What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

5 Answers   CitiGroup,


Categories