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

Is it possible to left uncode disp? If yes, how?

0 Answers  


Can I share my data with other jobs? How?

0 Answers  


Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ?

7 Answers   IBM,


What will happen when we try to pass data from JCL to COBOL using PARM parameter without declaring the length field in Linkage Section?

2 Answers   IBM,


How is the record format of an output dataset specified?

0 Answers  






If I defined space as TRK(10,10) for the one file and lrecl = 4K then tell me how many record will vsam file will contain. will it 1,2,3,4,5 or how many,

3 Answers   IBM,


wht do u mean by internal reader in jcl ? wht is the use of internal reader ?

1 Answers   Syntel,


how to create gdg with out using idcams utility

8 Answers   DSRC,


define cond parameter in jcl?

0 Answers   IBM,


What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

2 Answers  


what is the difference between JES3 and JES2?

0 Answers  


Suppose I have a file with three fields with data in the following format 1. empid - S9(4) COMP 2. empname - X(20) 3. empsal - S9(5)V(2) COMP-3 If I view this file, it will not be in a readable format. How to display the empid and empsal fields in a readable format without using COBOL program? What kind of SORT card will have to be coded?

4 Answers  


Categories