Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,co..

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

i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,co..

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

i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,co..

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

i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,co..

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

i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,co..

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

i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,co..

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

i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,co..

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

Post New Answer

More COBOL Interview Questions

If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....

1 Answers   HCL,


How to pass return codes from cobol to jcl?

5 Answers  


what will happen if pass values more than 100 using PARM parameter?

1 Answers  


how many times PARA-A is performed : PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMES-COUNTER >0 PARA-A MOVE P TO Q MOVE H TO TIMES COUNTER a.10 b.1 c.11 d.0

4 Answers   TCS,


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

0 Answers   IBM,






A table has two indexes defined. Which one will be used by the SEARCH?

0 Answers  


CAN ANY ONE HELP WHAT IS QTP? why it is nessery AND WEN IT IS USED?

1 Answers  


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

0 Answers  


what are the error codes in cobol, db2, cics, vsam , and jcl

2 Answers   TetraSoft,


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

0 Answers  


Why occurs cannot be used in 01 level in COBOL?

0 Answers   Arigo Infotech,


How to print 10 to 1 if the input have only 10 digit number?

0 Answers  


Categories