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 can you get the ksds file records into your cobol program?
how do you reference the esds vsam file formats from cobol programs
What is the difference between Call and a Link?
What is the local-storage section?
how to convert the recors form vsam file to db2 table tru file aid
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
Can a Search can be done on a table with or without Index?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
explain sorting techniques in cobol program?
What is rmode(any) ?
Mention the guidelines to write a structured cobol program?
What is the difference between PIC 9.99 and 9v99 in COBOL?
What is amode(24)?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
HOw can I get the negative sign while deduct high value from low value