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

Can we delete the data using IEFBR14 , IEBGENER??

5 Answers   Kanbay,


How do you submit a job for execution?

0 Answers  


In Job, there are 10 steps. If I want to execute the first 6 steps and don't want to execute from 7th to 10th step. What is the solution for this ?

7 Answers  


Suppose I have five jobs to do. But I want to hold one?

0 Answers  


What is default if we don't specify RD parameter at all ?

1 Answers   IBM,






Explain about Internal Sort

1 Answers  


How is a dataset passed from one step to another?

2 Answers   DELL,


How to create delta file using JCL

1 Answers   CTC,


For how long a job can be executed continuously in a mainframe ?

4 Answers  


i have 10,000 records in one input file.i want to sort 1 to 5000 records in one outputfile and remaining records sort in another output file write the syntax for this?

4 Answers   DELL,


how to modify the copy book?explain with examples

2 Answers   TCS,


how to compare two datasets without using superce because output is limited to 133 bytes

0 Answers  


Categories