sample code for read a 2nd record from last in flatfile how
can do?
Answer Posted / nsingh
ADD SEQUENCE NUMBER
SORT FIELDS=COPY
OUTREC FIELDS = (1,80,SEQNUM,ZD,A)
NOW SORT SEQ NUM IN DESCENDING ORDER
SORT FIELDS=(81,4,ZD,D)
INCLUDE ONLY 2ND LAST REC
SORT FILEDS = COPY
INCLUDE COND = (81,4,ZD,EQ,0002')
REMOVE SEQ NUM FROM FILE & THIS REC IS SELECTED
SORT FIELDS =COPY
OUTREC FIELDS = (1,80)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
Name some of the examples of COBOl 11?
What are various search techniques in cobol? Explain.
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What are the different rules for performing sort operation?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
How you can characterize tables in cobol?
What are the access modes of START statement?
What is static and dynamic call in cobol?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
Write a program to enter and display the names of students in a class using the occurs clause.
how do you reference the ksds vsam file formats from cobol programs
How many bytes S(8) comp field occupy and its maximum value?
What is the LINKAGE SECTION used in COBOL?
How do u write test cases?