I have 100 records in a file.. i want to sort the records from
5 to 5o... give the syntax...
Answers were Sorted based on User's Feedback
Answer / seema dawlekar
This can be done in two steps
in the step1 copy the the selective records by giving the
syntax as
skiprec = 4 -
stopaft = 50
this will copy only the selected records, now in the step2
we can perform sort
syntax is
sort fields=(starting position,length,type,A/D)
A--ascending and D--descending order
correct me if I am wrong
| Is This Answer Correct ? | 17 Yes | 0 No |
Answer / anand
Follow the workaround below,
1.split the file into 3 files using IDCAMS
file1 1-4
file2 5-50
file3 51-100
2.Sort the mid file file2.
3.Finally merge all the 3 files using concatenation.
| Is This Answer Correct ? | 3 Yes | 1 No |
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Can we redefine the field of x(200) to less than 200?
is it possible to rename 01 level?
how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
using redefine can you redefine lower variable size to higher variable size?
How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.
how to display comp3 variables reply soon ?
What rules are followed by the search verb.
I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. 05. C PIC X(3). 05. D PIC X(3). 05. E PIC 9(3). IN MY PROG, I HAVE MOVE 1 TO E. DISPLAY A. WHAT WILL BE DISPLAYED AS A RESULT OF THIS? PLEASE EXPLAIN THE ANSWER. THANKS.
Differentiate between structured cobol programming and object-oriented cobol programming.