IBM MainFrame Question:

Download Job Interview Questions and Answers PDF

How to fetch even records from one file to another file by using ICETOOL in JCL?

IBM MainFrame Interview Question
IBM MainFrame Interview Question

Answer:

//STEP1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.DATA,DISP=SHR
//OUTDATA DD DSN=OUTPUT.DATA,DISP=(NEW,CATLG,DELETE)
.
.
.
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUTDATA,SAMPLE=2

THIS WILL COPY ALL EVEN RECORDS
-------------------------------------------
FOR ODD RECORDS
OUTFIL FNAMES=OUTDATA,STARTREC=1,SAMPLE=2

Download IBM MainFrame Interview Questions And Answers PDF

Previous QuestionNext Question
File1 has 100 records and file2 has 200 records i want to copy 50 records which r in both file into file3?What does declare cursor and fetch cursor do?