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 |
give the examples of strings in cobol
) what is the difference between AID and HANDLE AID?
which is better either static call or dynamic call? and why?
is it possible to rename 01 level?
How to covert given string into ASCII value in COBOL/MF COBOL
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?
what is the difference between PA & PF keys?
What are the two search techniques ?
how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas
Difference between file status codes 02 and 22.... since both are for duplicate key detection.
How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.
In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.