in cobol i have one file it contains records like
10,4,23,98,7,90..... total records 100. iwant 10 to 20 in
reverse order in cobol environ ment any one please give the
answer......
Answers were Sorted based on User's Feedback
Answer / ramesh kumar
let me explain the ans for if the file is PS.
fist compute the value 100-80 into one ws-variable.
then read the file and add 1 to some ws-count variable upto 20th record then check for the conditon if it is 20th record
like if ws-variable = ws-count
if it is then write into o/p rec, now decresae 1 from ws-variable like subtract 1 from ws-variable
and read file again add 1 to ws-count then check for the conditon if it is 19 recrd then write into o/p rec.
perform until ws-variable=0.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / karthick
Ya its simple.......
U can select these records as primary key in ksds cluster.
In cobol program you specify access as random. then select
particular records. and then sort it out in reverse order.
| Is This Answer Correct ? | 1 Yes | 3 No |
what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?
Why we are using comp and comp-3 in real time projects?
What is the difference between PIC 9.99 and PIC9v99?
What is SET TO TRUE all about, anyway?
How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)
Whtz the specialty of 77 level number ?
how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
can we read in input the file with a variable length ? please , how ..could you help me ?
What are differences between COBOL and java ? why we are giving more preference to COBOL ?
How to define a array dynamically.....