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

i have a jcl in which 4 & 5 step creates a new generation. 4th step output is as input for the 6th step & 5th step output is used as input in the 7th step. How they are refered as in the 6th & 7th steps? If the job abends in 6th step then how the 5th step output is refered in 7th step?

2 Answers   IBM,


How is the keyword DUMMY used in JCL?

4 Answers  


Why do you use a control card?

3 Answers   IBM, iNautix,


How are GDGs concatenated?

1 Answers  


How many extents are possible for a sequential file ? For a VSAM file ?

3 Answers  






How do you skip a particular step in a proc/JOB?

5 Answers   CSC, CTS,


what is the compile process of cobol program expalin with code

0 Answers   IBM,


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,


What are the common keyword parameters in both job and exec statements

4 Answers   Cap Gemini,


Is it possible to define dd statements as you want?

0 Answers  


What is the use of symbol // in jcl?

0 Answers  


We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

0 Answers   IBM,


Categories