How to retain the Duplicates in the one records?

Answers were Sorted based on User's Feedback



How to retain the Duplicates in the one records?..

Answer / kk

Hi,

Using sort Utilities,
some fields=None,xsum
//STEP010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=TEST.XSUM.INPUT,DISP=SHR
//SORTOUT DD DSN=TEST.XSUM.OUTPUT,DISP=SHR
//SORTXSUM DD DSN=TEST.XSUM.OUTPUT.XSUM,DISP=SHR
//SYSIN DD *
SORT FIELDS=(2,10,CH,A)
SUM FIELDS=NONE,XSUM

Is This Answer Correct ?    15 Yes 4 No

How to retain the Duplicates in the one records?..

Answer / tv

The question is want to retain duplicates. So sum
fields=none shouldn't be used in SORTing.

Is This Answer Correct ?    1 Yes 2 No

How to retain the Duplicates in the one records?..

Answer / sow

in Sysin dd*

sortfields=copy
sumfields=none,xsum

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More COBOL Interview Questions

What are the pertinent COBOL

0 Answers   IBM,


77 I pic 99 value 5 Perorm para-A I times. Para -A. move 10 to I. How many times the para-A will be executed.?

9 Answers   TCS,


How to read records which is in sequential file in reverse order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my doubt any one

10 Answers   IBM,


Hi all, I have a following requirement to write the cobol program. I have to load the 129 variables from input sequential file which are in excel sheet to the cobol inernal table. and after loading into table i have to compare this data with the business file. here compare means controlling the data whether the format(numeric,alpha) is same in the business file and in the table??? i have the same data in input and business file. could anyone please give me any idea of the logic?// i have all the 129 different variables(129rows,1 column)is there .

4 Answers   IBM, Syntel, TCS,


how do you reference the esds vsam file formats from cobol programs

0 Answers  






What is the difference between PIC 9.99 and 9v99?

7 Answers  


01 a pic x(6) value is abcdef 01 b pic x(3) move a to b wht will be the value in b ?

3 Answers   Patni,


How to read a record from bottom of a file which is indexed by 'A'.

4 Answers   Oracle,


i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?

5 Answers   HCL,


Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed to 4 characters) and forgot to change the DCLGEN in COBOL program, what will happen during the execution of code? If the program Abends then what will be the error? If it doesn't abend then hpw the error can be catched?

5 Answers   IBM,


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 ?

0 Answers  


Can we change the password using ALTER? anyone tried and changed?

0 Answers   IBM,


Categories