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

I have sequential file recl 1000 i want to add another 15 bytes to it. The record length should not change..How?

1 Answers   CTS, HCL,


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

0 Answers  


soc-7 is a bad data,invalid data. when ever we are moving the alphabets in the position of numeric then we got this abend. so my question is if o1 ws-data pic 9(1) value passing the alphabet some x. then we got soc-7 or not? i want clarification ?

7 Answers   CitiGroup, IBM,


How to convert bunch of words in a line to relvant ASCII values?

2 Answers  


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

0 Answers  






RENAME clause takes new SPACE in memory.TRUE or FALSE? a)TRUE 2)FALSE

12 Answers   TCS,


i want a program using by if, evaluate , string, unstring, perform, occurs?

1 Answers  


what is level 66 means??

7 Answers  


A LESS 1200 IF B GREATER 25 MOVE 47 TOC ELSE MOVE 57 TO C IF A GREATER 249 MOVE 67 TO C ELSE NEXT SENTENCE ELSE IF B LESS 67 MOVE 27 TO C What will be the value of C, when A is 137 and b is 25

3 Answers   TCS,


Differentiate between structured cobol programming and object-oriented cobol programming.

0 Answers  


diffrence between z(2) and z9(2)

4 Answers   Cap Gemini,


how to transfer the file from pc to mainframe??

4 Answers  


Categories