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 |
what is a load module ?
A paragraph PARA-X is to be executed when none of the data names A, B and C have value of 1. Which of the following will achieve this ? (a) IF A NOT = 1 OR B NOT = 1 OR C NOT = 1 PERFORM PARA-X (B) IF NOT A= 1 AND B= 1 AND C = 1 PERFORM PARA-X (C) IF A NOT =1 IF NOT B = 1 OR C= 1 PERFORM PARA-X (C) IF A NOT = 1 AND B NOT = 1 AND C NOT = 1 PERFORM PARA-X
In COBOL "BEFORE" advancing is there or not ?
I know my query will return more than one row but I don't want cursor what should I do?
Have you used comp and comp-3 in your project? And how?
What divisions, sections and paragraphs are mandatory for a COBOL program?
Can JUSTIFIED be used for all the data types?
what is scope terminator
01 x pic s9(8) comp. How will the following value be internally allocated '18787'
why do u need inspect verb?
For rewrite, why is it mandatory that file needs to be opened?
What is the usage of comp fields in cobol?