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
how do you reference the printer file formats from cobol programs
how do you reference the variable unblock file formats from cobol programs
how can i see junk values in dclgen or in hostvariable of comp ?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
how to access the file from prodution from changeman tool and to submit a file to production
Explain how to differentiate call by context by comparing it to other calls?
When is inspect verb is used in cobol?
What are declaratives and what are their uses in cobol?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
Can you please let me know the centre name of INS certification in Kolkata.
what is search and searchall?what is the diffrence between them?give an best example?
What is the difference between external and global variables in COBOL?
Why occurs cannot be used in 01 level in COBOL?
How do u write test cases?
How you can read the file from bottom?