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
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
What is inspect in cobol ?
How arrays can be defined in COBOL?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What are the different data types in cobol?
Describe the cobol database components?
What is redefines clause in COBOL?
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is the use of intialize verb?
Whats the difference between search & search ALL?
how to refer the data field?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
Write the code to count the sum of n natural numbers.
Which Search verb is equivalent to PERFORM…VARYING?