i want to use only first 100 records from a file.plz tell
me how to write JCL for this(for read,copy,write
operations).plz give me details of all posible JCL
utilities?
Answers were Sorted based on User's Feedback
Answer / madhuri tungal
Use IDCAMS program.
//.........JOB........
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INDATASET(INPUT FILE) OUTDATASET(OUTPUT FILE)
SKIP(0) COUNT(100)
/*
| Is This Answer Correct ? | 37 Yes | 2 No |
Answer / selva
SORT FIELD=COPY, SKIPREC=200 (OR SOME MORE RECORDS),
STOPAFT=100
will skip first 200 records, the correct option is
SORT FIELD=COPY,STOPAFT=100
| Is This Answer Correct ? | 17 Yes | 0 No |
Answer / khbnaidu
Using SORT you can do this...
SORT FIELD=COPY, SKIPREC=200 (OR SOME MORE RECORDS),
STOPAFT=100
| Is This Answer Correct ? | 15 Yes | 10 No |
Answer / santy
Hi,
U can use only first 100 records from a file by using the
IDCAMS utility.
JCL to perform this operation is as below,
//JOBNAME JOB ,, Notify=User_id
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INDATA DD DSNAME=DATA1
//OUTDATA DD DSNAME=DATA2
//SYSIN DD *
REPRO
INFILE(INDATA) OUTFILE(OUTDATA)
START(0) COUNT(100)
/*
COUNT variable in JCL with start counting a record from
start position 0 and count first 100 record.
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / arul anand.a
SORT FIELD=COPY,
SKIPREC=0 ( skip 0 records)
STOPAFT=100 (stop after 100 records).
so it will copy only first 100 records.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / nataraj
copy file to esds file this file only sequance order so copy
only first 100 records
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / santy
by using IDCAMS utility u can do this.
//JOBNAME JOB ,, Notify=User_id
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INDATA DD DSNAME=DATA1
//OUTDATA DD DSNAME=DATA2
//SYSIN DD *
REPRO
INFILE(INDATA) OUTFILE(OUTDATA)
START(0) SKIP(100)
/*
| Is This Answer Correct ? | 7 Yes | 8 No |
write a program to eliminate duplicate records in a input file and send them to output file.THIS IS IGATE RECENT QUESTIONN.....JUST 1 WEEK BACKKKK...
How to resolve the soc4 and soc7 errors?
Can we use goto statement in inline_perform ?
in a indexed file what is procedure for read the records from 12 to 18. please give the code example
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
Discuss about changing dataset name in proc.
What are the differences between OS VS COBOL and VS COBOL II?
How many types of sorts are there in cobol?
Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?