oza017.myorg.emp has 100 records ,oza018.myorg.staff has
200 records but 50 are the common records in both files
copy all the common records into oza017.myorg.xyz dataset

Answers were Sorted based on User's Feedback



oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records..

Answer / vinodh

IN SORT, YOU CAN USE JOINKEYS AND CAN TAKE 50 COMMON
RECORDS IN B/W 2 I/P FILES AND WRITE TO O/P FILE.

Is This Answer Correct ?    1 Yes 1 No

oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records..

Answer / mariopuzo

//step01 exec pgm=sort
//sysin01 dd=input1,disp=shr
// dd=input2,disp=shr
//sysout dd=output1,disp=(new,catlg,del)
//sysin dd *
Sum fields=none
/*

Is This Answer Correct ?    0 Yes 0 No

oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records..

Answer / challa srinivas

//SORT1 EXEC PGM=SORT
//SORTJNF1 DD DSN = oza018.myorg.staff
DSN = oza017.myorg.emp
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DSN = oza017.myorg.xyz
JOINKEYS FILES=F1,
JOINKEYS FILES=F2,
REFORMAT FIELDS
SORT FIELDS=COPY

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

When will we need to specify Space parameter ?

3 Answers   Wipro,


What is the meaning of the following declaration : DCB=BLKSIZE=, What is the difference between above declaration & not specifying DCB at all for a output file?

1 Answers  


What is 'S0C7' abend?

9 Answers  


What is order of searching of the libraries in a JCL?

4 Answers  


how many max steps can we use in a job? pls answer to my question

3 Answers   TCS,






is there any utility for restarting a particular step in jcl reply soon ?

5 Answers  


In My job I have 15 procs.and in each proc i have 3 steps. i want to execute 3 step in proc 10.is it possible? if possible how?

2 Answers   HP,


The maximum number of in-stream procedure you can code in any JCL is ?

5 Answers  


1)what is compilation jcl for cobol program but it is calling another program 2)what is compilation jcl for cobol program but it is calling another program(in this, main program is pure cobol but sub program is cobol+db2 program.can anyone please answer me for above questions. it's very urgent

4 Answers   Mind Tree,


What does a disposition of (NEW,CATLG,DELETE) mean?

3 Answers  


What do you understand by the term job time – out and how can you overcome that?

0 Answers  


I have a PDS and want to omit few rows of all members of a PDS. How to do it?

6 Answers   Accenture,


Categories