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

Answers were Sorted based on User's Feedback



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

Answer / harsha

//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

Is This Answer Correct ?    5 Yes 0 No

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

Answer / mdv

Both solutions given above are right.

Is This Answer Correct ?    1 Yes 0 No

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

Answer / rajvee

Step01 exec pgm=sort
.
.
.
sysin dd *
sort fields=copy
outfil fnames(out1,out2),split

first rec will be in out1 file, second in out2,third in
out1 and so on..

so out2 will have even number recs.

Is This Answer Correct ?    4 Yes 4 No

Post New Answer

More JCL Interview Questions

Give the syntax of job specifying jcl statement.

0 Answers  


How does -818 sql error occur? Why does it happen and what can be done to overcome this error code?

5 Answers   RBS,


Explain the job statement in jcl?

0 Answers  


How can a jobs execution priority be modified?

0 Answers  


what is DD statement is used in JCL?

0 Answers  


hi in one of the interview one asked me how to submit a job from cobol?as well as how to submit a jcl from CICS? can u pls any one tell me..

1 Answers   CTS,


Matching Logic in Jcl not in cobol.Could any one please answer this question

0 Answers  


1.How to check for the errors using TYPRUN=SCAN?What will be the output if we give TYPRUN=SCAN?

11 Answers  


Why we us SYSTSIN DD with IKJEFT01 (TSO Utility) to execute a COBOL DB2 program? Why can't we use SYSIN DD?  

1 Answers   TCS,


How can unused space allocation be returned to the system when a dataset is closed?

0 Answers  


how to set dependancy for jobs?

4 Answers  


what is full form of AIX

3 Answers   Accenture,


Categories