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 / madhu

We can achieve the same easily by using ICETOOL.

//STEP001  EXEC PGM=ICETOOL                                      
//TOOLMSG  DD  SYSOUT=*                                          
//DFSMSG   DD  SYSOUT=*                                          
//SYSPRINT DD  SYSOUT=*                                          
//SYSOUT   DD  SYSOUT=*                                          
//SORTIN   DD DSN=SORT.TEST,DISP=SHR                      
//SORTOUT  DD  DSN=SORT.TEST.OUTPUT,DISP=(NEW,CATLG,DELETE),
//        SPACE=(CYL,(500,500),RLSE)                             
//TOOLIN DD *                                                    
  SUBSET FROM(SORTIN) TO(SORTOUT) INPUT REMOVE RRN(4) RRN(6)     
/*                                                               
//          

Explanation:
SORTIN refer input file with 10 records
SORTOUT is the new file created by excluding 4th and 6th records.
SUBSET,INPUT and REMOVE are defined ones in ICETOOL.
RRN is used to refer the required record .

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of dd disp parameter?

1071


How jcl work to handle various input output file operations?

1089


What is one line to pass PARM from JCL to COBOL?

4897


What is the function of the steplib dd statement?

1132


what is the use of JCL?

1108


How does jcl specify the job to the operating system?

1183


Explain how can return codes be tested before execution of a job step?

1277


What is job control language?

1032


which parameter is used to check the syntax of a jcl without executing it?

1302


How would you understand error(execution phase)?

1168


what is use of space parameter in dd statement?

1208


Explain how can values be passed from the job stream to an executable program?

1126


What does a disposition of (MOD,DELETE,DELETE) mean ?

1070


I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

2553


how you will the direct the data to spool using sysout option?

2354