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...

Suppose i have a file with 10 recs and i want to skip only the
7 th record and copy the rest into another file. How do i do
it using SORT?

Answer Posted / manoj

This can be done using two SORTs in a JCL.
1. In the first SORT, sort the file and create two output
files.
File 1: Containing records from 1 to 7
File 2: Containing records 9 & 10

//SYSIN DD*
SORT FIELDS=COPY
OUTFIL FILES=01,ENDREC=07
OUTFIL FILES=02,STARTREC=09,ENDREC=10
/*

2. Use another SORT statement and then merge the two
statements created above.

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you code a null statement?

1275


Matching Logic in Jcl not in cobol.Could any one please answer this question

4108


What is the purpose of the dd keylen parameter?

1147


Are there any set of rules for the names of the steps used in a job?

1051


how to do automated restart when a job abends?

1336


Explain the function of the dd dcb keyword?

1182


For what purpose steplib and joblib are used ?

1074


Explain how can a stopped job be started again?

1080


Does jcl support automatic restart?

1177


When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?

1179


I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

2295


Explain the function of dd name parameter with a 2 part structure; audit.report?

1398


How can a stopped job be started again?

1138


What is the purpose of dd * statement in jcl?

1225


State the uses of syspring, sysin, sort fields, sum fields and dummy.

1024