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

GDG Create syntax ?

4 Answers   Xansa,


Can you delete the GDG base without deleting GDG generations ?

7 Answers   Cap Gemini,


can anyone explain me about sort in jcl with inrec and outrec ?

2 Answers   HCL,


Is it possiable to use a gdg in the INCLUDE statement in a SORT jcl? I am using this because I want to change the condition with out changing the jcl. Please provide with a sample code.

1 Answers  


IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C

0 Answers  


how can i code cond parameter in procedures ? i have a jclk calling a proc which has 10 steps i want to execute from step 5 to step 10 where can i code restrat parameter or cond parameter for ths

4 Answers   IBM,


if my GDG limit has been kept as 50 and if am trying to put 60 records.what would happen. will there be any abend for this scenario

4 Answers  


which utility is used to update pds?

1 Answers   IBM,


Hi, can any one tell about " How do u eliminate the duplicates "

2 Answers   Cap Gemini,


What is the differentiation between TRK,cyl, and Bytes... how they can be connected??

2 Answers  


how to resolve soc-7 ? please tell me

3 Answers   IBM,


What is the use of ikjeft1b utility in jcl?

1 Answers  


Categories