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
how do you reference the rrds file formats from cobol programs
What is redefines clause in COBOL?
What is the difference between perform … with test after and perform … with test before?
What are the cobol coding sheets?
What is the Purpose of Pointer in the string?
In which area will you utilize 88 level items in cobol?
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.
Difference between array and sub-script ?
) what is the difference between AID and HANDLE AID?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
how do you reference the variable unblock file formats from cobol programs
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What is link edit in cobol?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?