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

How do you create a temporary dataset? Where will you use them?

2 Answers   IBM,


Is stepname is a MUST and should be unique also for each JOBSTEP ? or system can supply the stepname for a step which is not given a name by the programmer ?

6 Answers   IBM,


How to Enter The Spool Area In Real Time?

7 Answers   IBM,


the command to open a dataset directly from the JCL instead of opening it separately using 3.4 option.

7 Answers   IBM,


what is the resolution for sb37 error

2 Answers   TCS,






What is DSNDB06 ?

1 Answers  


What is a JCL Command statement ?

1 Answers   IBM,


I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one

0 Answers  


What is DISP= (NEW,PASS,DELETE)?

3 Answers   HCL,


what is the cond=even only

4 Answers   EDS,


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

5 Answers  


Is it possible to code instream data in a PROC?

0 Answers  


Categories