In a file(PS), we dont know how many records are there.
requirement is divide half n half the records n insert into
2 another files(PS).

Answers were Sorted based on User's Feedback



In a file(PS), we dont know how many records are there. requirement is divide half n half the recor..

Answer / shaan

Use Sort program to count the no of records and then sent
half of them to a PS file using sort fields=copy with
skiprec and stopaft command.

Is This Answer Correct ?    18 Yes 3 No

In a file(PS), we dont know how many records are there. requirement is divide half n half the recor..

Answer / vijju

may be u can use SPLIT options in sort card

Is This Answer Correct ?    7 Yes 1 No

In a file(PS), we dont know how many records are there. requirement is divide half n half the recor..

Answer / abhijit

OUTFIL FNAMES(OUT1,OUT2) SPLIT

Is This Answer Correct ?    4 Yes 0 No

In a file(PS), we dont know how many records are there. requirement is divide half n half the recor..

Answer / kumar

sort fields=copy
outfil files=(01,02),spilt

Is This Answer Correct ?    3 Yes 0 No

In a file(PS), we dont know how many records are there. requirement is divide half n half the recor..

Answer / ram

any one write the code

Is This Answer Correct ?    0 Yes 0 No

In a file(PS), we dont know how many records are there. requirement is divide half n half the recor..

Answer / kk

Write a cobol program with an Index and read the input file
and write to two files based on alternative records.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More VSAM Interview Questions

in vsam at the creation of cluster what is the use of RECSZ parameter?

2 Answers   TCS,


What is SHAREOPTS ?

2 Answers  


Explain the catalog?

0 Answers  


what do you mean by a upgrade set in vsam?

0 Answers   IBM,


Define a path?

0 Answers  






By looking into JCL can we identify the dataset is VSAM (VSAM dataset supposed to be a input dataset).In this scenerio how will we identify the dataset is VSAM ?

5 Answers   Cognizant, EDS, Shridhar,


How do I declare the KSDS vsam so that I can store a reocrd with variable length?.

2 Answers  


Can AMS commands be run from the TSO prompt ?

1 Answers   IBM,


Suppose a generation of GDG gets created in a particular step of a proc. How would you refer the current generation in a subsequent step? What would be the disposition of this generation now?

2 Answers   IBM,


What is free space?

1 Answers  


in what type of vsam datasets can an alternate index be defined??

4 Answers  


what do you mean by the cobol record key clause in vsam?

0 Answers   IBM,


Categories