I have files that contains both duplicates files(occur more
than twice) and non-duplicate files.The file is already
sorted by a key.I want to determine those records that are
duplicate and will be move to a duplicate file and non-
duplicate files to be move to a valid file.thank you.help
please
Answers were Sorted based on User's Feedback
Answer / tamilselvan
Instead of cobol, try this with SORT in JCl.it will be
easier.
SORT FIELDS=copy
SUM FIELDS=NONE,XSUM
define a file with DD card SORTXSUM after SORTWK file in
the proc step.
You can capture the duplicate rows in the sortxsum file and
non dupliucates in the SORTOUT file.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / sowjanya
using jcl,
//ddname1 <- input file
//ddname2 <- outfile1(no duplicates)
//xsum <- outfile2 (duplicate)
//sysin dd *
sort fields=copy
sumfields =none,xsum
/*
| Is This Answer Correct ? | 4 Yes | 1 No |
study the following code 01 A1 05 B PIC 99 05 C PIC X(4) 01 A2 05 B PIC 99V99 05 C PIC A(4) pick out the valid statement from the following a.A1 and A2 can not have sub-ordinates b.A1 and A2 can have the same sub-ordinates but must have same PIC clause c.there is nothing wrong d.A1 and A2 can have same sub-ordinates provided they are not at 01 level
Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.
Whats the use of Examine command? can someone help me?
What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?
8 Answers Arigo Infotech, IBM,
I have a occurs for 100 times but it has executed 101 time what could be the reason?
in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......
Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?
i want a program using by if, evaluate , string, unstring, perform, occurs?
how to convert the recors form vsam file to db2 table tru file aid
How do you do in-line PERFORM?
how to access the file from prodution from changeman tool and to submit a file to production
How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)