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
What is an in line perform? When would you use it? Anything else you wish to say about it.
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?
What guidelines should be followed to write a structured cobol prgm?
What rules are to be followed while using the corresponding options?
What is the difference between goback, stop run and exit program in cobol?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
How do you define a variable of comp-1 and comp-2?
how do you define single dimensional array and multidimensional array in your cobol?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Write a program to explain size error.
How do get the result of your program directly on your pc?
Why would you use find and get rather than to obtain?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
what are decleratives in cobol?