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

how do you reference the printer file formats from cobol programs

1162


how do you reference the variable unblock file formats from cobol programs

1291


how can i see junk values in dclgen or in hostvariable of comp ?

2950


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

1077


how to access the file from prodution from changeman tool and to submit a file to production

7466


Explain how to differentiate call by context by comparing it to other calls?

1142


When is inspect verb is used in cobol?

1199


What are declaratives and what are their uses in cobol?

1146


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2027


Can you please let me know the centre name of INS certification in Kolkata.

2202


what is search and searchall?what is the diffrence between them?give an best example?

6694


What is the difference between external and global variables in COBOL?

1383


Why occurs cannot be used in 01 level in COBOL?

1131


How do u write test cases?

2029


How you can read the file from bottom?

1093