i have two flat files.i want to select one record from that
file by using jcl.for example file1 contains emp
no,name,joining date. file2 has same details.emp no is
primary key. i will give empno.that emp details send to
outfile.please let me know if any one knows it.give sample
code.



i have two flat files.i want to select one record from that file by using jcl.for example file1 co..

Answer / vs kumar

//SORTIN DD DSN=INPUTFILE1,DISP=SHR
//SORTOF01 DD DSN=X.Y.OUTFILE1,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,STARTREC=1,ENDREC=1
/*
//SORTIN DD DSN=INPUTFILE2,DISP=SHR
//SORTOF02 DD DSN=X.Y.OUTFILE2,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=02,STARTREC=1,ENDREC=1
/*
//STEP2 EXEC PGM=SORT
//SORTIN DD DSN=X.Y.OUTFILE1,DISP=SHR
// DD DSN=X.Y.OUTFILE2,DISP=SHR
//SORTOUT DD DSN=X.Y.OUTFILE,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
/*

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More JCL Interview Questions

can we bowse or edit the GDG dataset if it is a tape entry?

4 Answers  


Explain about LMOPEN -

1 Answers  


Give the syntax of job specifying jcl statement.

0 Answers  


What does S0C4 error mean?

8 Answers  


If i am going to change some variable in a copybook( size or variable type) ,what are the changes that need to be done in the corresponding JCL.

4 Answers   IBM,






What parameter directs the output of the job log dataset?

0 Answers  


What are three parameters you can specify on Job statement as well as on exec stmt ?

1 Answers  


if we compile the cobol+ db2 program now ofter 5 years we need to compile again?

1 Answers   TCS,


I have a job (4 steps) with time parameter coded in job & exec, say time=10 in job & time =3,2,2,4 in each steps. Will the job executes successfully?

4 Answers   Cognizant,


What are the causes for S0C1, S0C4, S0C5, S0C7, S0CB abends ?

11 Answers   Tesco,


how to see the latest generation in gdg?

3 Answers   Deloitte,


What is jcl in mainframe?

0 Answers  


Categories