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 |
what is lrec=f,what is difference between f,fb,v,vb?what is default value?how do we came to know that records are in f,fb,v,vb?
i want to store 20 digits . h will u do it in cobol ?
Explain about Redefines cluse?
what is the diff b/w select stsmt and cursor ?
how to access vsam files in cobol and how to differentiate that this is ESDS file
I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non-duplicate that will be move to valid file.thank you
what is SYNCHRONIZATION?
how can we get current dat and time thru cobol pgm
I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?
Write a program that uses move corresponding.
I have a File that has duplicate records. I need only those records that occur more than thrice.?
Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.