Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


i have 10,000 records in one input file.i want to sort 1 to
5000 records in one outputfile and remaining records sort in
another output file write the syntax for this?

Answers were Sorted based on User's Feedback



i have 10,000 records in one input file.i want to sort 1 to 5000 records in one outputfile and rema..

Answer / albert

SORT FIELDS=COPY
OUTFIL FILES=1,STOPAFT=5000
OUTFIL FILES=2,SKIPREC=5000

Is This Answer Correct ?    28 Yes 8 No

i have 10,000 records in one input file.i want to sort 1 to 5000 records in one outputfile and rema..

Answer / muttaiah

@Albert:
IF we are using Outfil, we won't use Skiprec & stopaft.

My Answer:
Step1:
sort fields=copy
outfil files=01,endrec=5000
outfil files=02,startrec=5001,endrec=10000
Step2:
Sort fields=(pos,leng,cha,a or d)

Is This Answer Correct ?    7 Yes 0 No

i have 10,000 records in one input file.i want to sort 1 to 5000 records in one outputfile and rema..

Answer / v khurana

One more bethod is there, i.e. by using SPLIT1R

OUTFIL FNAMES=(FILE1,FILE2), SPLIT1R=5000

Is This Answer Correct ?    5 Yes 1 No

i have 10,000 records in one input file.i want to sort 1 to 5000 records in one outputfile and rema..

Answer / prakash

sort fields=copy
outfil files=1,endrec=5000
outfil files=2,start rec=5001,endrec=10000

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More JCL Interview Questions

Explain about File Tailoring

1 Answers  


what is the use of temporary files?

5 Answers   Hexaware,


What does the one advantange of using IEBUPDTE?????

2 Answers  


At what stage, operator can change the class and priority of a submitted job?

2 Answers  


When space is allocated for an output dataset, what units can be used?

0 Answers  


Write a JCL by using the below requirement: File1 =1, File2 =11 and output needs to come as File3 =111?

8 Answers   Saggezza,


Can you delete the GDG base without deleting GDG generations ?

7 Answers   Cap Gemini,


Hi, I have a requirement File A : I have 6 records out of which 4 are same. File B: I have 8 records out of 6 records are same. The 4 records in FILEA and 6 records in FILE B are same. If we substract we will get two records, I need these two records in output file This is because to remove the duplicates from the database. Through easytrieve we can compare but for that there should not duplicates, but in my file I have duplicates. Thanks in advance!!

2 Answers  


How to view the hexa decimal value thru file aid if copy book is not present for that particular data

1 Answers  


what is the purpose of SYSOUT parameter in the DD statement?

1 Answers  


wht is the d/f between positional parameter n keyword parameter ?

1 Answers  


can we write a proc with in a proc

4 Answers   IBM,


Categories