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
What is a report item?
What is perform what is varying?
how do you reference the ksds vsam file formats from cobol programs
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
What is a SSRANGE and NOSSRANGE?
How do get the result of your program directly on your pc?
What is the difference between perform … with test after and perform … with test before?
how do you reference the variable block file formats from cobol programs
Differentiate between structured cobol programming and object-oriented cobol programming.
What is the difference between a binary search and a sequential search what are the pertinent cobol?
How arrays can be defined in COBOL?
What is the Purpose of Pointer in the string?
Which division and paragraphs are mandatory for a COBOL program?
How to know whether the module is dynamical or statistical?
How do you differentiate between cobol and cobol-ii?