How to retrive the 9th records out of ten records using the
cobol program ?
Answer Posted / ramesh
IDENTIFICATION DIVISION.
PROGRAM-ID. RAMESH.
ENVIRONMANT DIVISION.
DATA DIVISION.
FILE-SECTION.
FD INFILE.
01 IN-REC
05 NAME
05 AGE
WORKING-STORAGE SECTION.
01 WS-COUNT PIC 99.
PROCEDURE DIVISION.
ACC-PARA.
accept ws-num
move 0 to ws-count
ADD-PARA.
read infile
add 1 to ws-count.
perform add-para until ws-count = ws-num
display in-rec.
Note: as per ur requirementprovide ws-num=9
COMPILE IT .PASS WS-NUM THRU RUN JCL SYSIN AS 9 .You will
get the 9th record.
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
what is search and searchall?what is the diffrence between them?give an best example?
What is comp-1 and comp-2?
What is rmode(24)
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
Name the sections present in data division.
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
Describe the cobol database components?
What is the difference between comp and comp-3 usage?
What is amode(31)
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
What is link edit in cobol?
Can you please let me know the centre name of INS certification in Kolkata.
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?