a input file contains 1000 records, how to move the first
500 record into one out put file and how to move to second
500 records to anothere output file
Answers were Sorted based on User's Feedback
Answer / bvr
THIS IS FOR COPY FIRST 500 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) THIS IS FOR COPY FIRST 100 RECORDS
/*
THIS IS FOR COPY next 100 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
skip(500) -
COUNT(500)
/*
Is This Answer Correct ? | 15 Yes | 4 No |
Answer / balusu
//STEP0020 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FSS012.SAMPLE.IN,DISP=SHR
//SORTOUT DD DSN=FSS012.SAMPLE.OUT4,
// SPACE=(TRK,(5,5),RLSE),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB),
// UNIT=SYSDA,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY,STOPAFT=501
/*
//STEP0021 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FSS012.SAMPLE.IN,DISP=SHR
//SORTOUT DD DSN=FSS012.SAMPLE.OUT5,
// SPACE=(TRK,(5,5),RLSE),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB),
// UNIT=SYSDA,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY,SKIPREC=499
/*
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / varsha
Using SPLITBY option, you can do it in one step only -
//JOBNAME
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT DSN,DISP=SHR
//OUT1 DD DSN=OUTPUT DSN1,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//OUT2 DD DSN=OUTPUT DSN2,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(OUT1,OUT2),SPLITBY=500
/*
//
Please correct .. if I am wrong
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / nishant
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) COPYING FIRST 500 RECORDS
SKIP(500)
REPRO -
INFILE(DD1) -
OUTFILE(DD3) -
skip(500) -
COUNT(500) COPYING NEXT 500 RECORDS
/*
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kalpesh
THIS IS FOR COPYING FIRST 500 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) COPYING FIRST 500 RECORDS
SKIP(500)
/*
THIS IS FOR COPY next 500 RECORDS
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
skip(500) -
COUNT(500) COPYING FIRST 500 RECORDS
/*
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / saurabh gupta
using IDCAMS utility
//sysin DD*
REPRO -
INFILE(DD1) -
OUTFILE(DD2) -
COUNT(500) THIS IS FOR COPY FIRST 100 RECORDS
SKIP(500) IF WE WANT TO COPY ONLY 501 TO 1000 RECORDS
/*
Is This Answer Correct ? | 2 Yes | 5 No |
when does a dataset go uncataloged?
what if any ,is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.
What are the 2 types of parameters in dd statement?
How to DEBUG a JCL?
Explain about LMFREE�free data set from its association with data ID
How to identify where file is empty or not? How many ways are there to identifying?
What is the function of the dd dcb keyword?
if we give TIME=0 how many sec that job/step
which utility is used a dummy utility?
How to pass data to a program that is coded in an exec statement?
Can I copy the FB (fixed Block) record length file to a VB (variable Block)record length file and Vise Versa? If Yes then how ? is that thru one of the JCL utility ?
is it possible to submitt more than one job in job card in jcl? and if yes than is it necessary to have the jobs same name?