How to retrive the 9th records out of ten records using the
cobol program ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shan
If you are sure that ur file will always have 10 records,
then move high-values to record format and read prior twice.
Is This Answer Correct ? | 6 Yes | 6 No |
I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.
I have a file it contain 10 records.i got abend at 8th record because of soc7.how do you know that perticular record got abend?
plz,could any one tell me? what about EBCDIC in cobol?briefly?
what is level 66 means??
What is Comm?
2 Answers IBM, Kemper Corporation,
How is sign stored in Packed Decimal fields and Zoned Decimal fields?
i have the job which has written updated 100 records into the table and for 101th record it got abended and i want to start the job again and should wirte from 101th record not from 1st record..how to do it..?
What is Static and Dynamic linking ?
how do you reference the variable block file formats from cobol programs
how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?
What are different file OPEN modes available in COBOL?
hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?