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

have in 100 records in a file i want to move only matched
records to one output_file1 and nonmathed records are
moved to another output_file2 ... any one can provide
logic code

Answer Posted / ananth

Use Syncsort or Dfsort for this.

//S001 EXEC PGM=SORT
//SORTIN DD DSN=inputfile,DISP=SHR
//SORTOF01 DD DSN=dsn.match,DISP=(NEW,CATLG)
//SORTOF02 DD DSN=dsn.unmatch,DISP=(NEW,CATLG)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
OUTFIL FNAMES=01,INCLUDE=(1,5,CH,EQ,C'A1000')->for match
OUTFIL FNAMES=02,INCLUDE=(1,5,CH,NE,C'A1000')->for nonmatch
/*

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Discuss about changing dataset name in proc.

1215


) how do u code after getting data?

2132


What is amode(24)?

1219


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2113


What is the difference between Call and a Link?

1174


How many sections are there in data division in COBOL?

1113


What are declaratives and what are their uses in cobol?

1184


For rewrite, why is it mandatory that file needs to be opened?

1088


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17850


How do get the result of your program directly on your pc?

2327


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

1138


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1417


What are the different rules to perform a Search?

1077


what happens if parmparameter passes zero bytes to the program

2115


When is inspect verb is used in cobol?

1233