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 |
Name the divisions in a COBOL program ?
what is the difference between start and startbr?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Can we use icetool in cobol program?
How to read the last 100 records from a COBOL file. The file contains N number of records.
If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and will there be any error becoz of the Negative value
which generation language is cobol
9(2).99 how many bytes take? Why . consider as a byte?
PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B>2 AFTER C FROM 2 BY -1 UNTIL C<2 How many times the paragraph ACCUMULATE-TOTALS would be exicuted?
what is soc7 abend?how u can trace it?
What is reference modification? What is UNION in sql and syntax? What is the difference between GDGS and VSAM? Which is prefer one? What is processing groups in endevor?
How many bytes will be allocated for the following record description entries? 01 REC-A. 05 A PIC S9(4). 05 B PIC XXXBXXX. 05 C PIC ____9.99. 05 D PIC S9(5) COMP-3. 05 E PIC 9(3) COMP.
16 Answers IBM, TCS,