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

what happens of we dont give time stamp in precompilation process

2 Answers  


Explain what you understand by passing by value.

0 Answers  


Can a Search can be done on a table with or without Index?

0 Answers  


what is the difference between Plan & package?

1 Answers   IBM,


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

0 Answers   IBM,






WE HAVE 2 FILES IN COBOL. ONE IS FIXED LENGTH RECORDS ANOTHER ONE IS VARIABLE LENGTH. IF I DECLEAR LRECL OF FIXED ONE AS 80 AND 2ND RECORD AS 132. WHAT WE NEED TO DECLEAR LRECL FOR THOSE 2 FILES IN JCL?

4 Answers   iGate,


what is filler and what is use of filler

3 Answers   Syntel,


what is the diff b/w select stsmt and cursor ?

2 Answers  


What is SQL Code -904 and -903 in DB2 And how to handle it?

1 Answers   IBM,


What do you do to resolve SOC-7 error?

2 Answers   Sun Life, Wipro,


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


What are the situations u have used in ur project for Subcript and Index ? 1.if u use Subscript why not Index,why u choose Subscript only? 2.if u use Index why not Subscript,what abt Displacement?

2 Answers   Cap Gemini,


Categories