I had 100 records and i want to execute last three records by
using cobol programming?what will be coding?
Answers were Sorted based on User's Feedback
Answer / atul
Using Short card you can write the last 3 records.
Short card as :
SORT FIELDS=COPY SKIPREC=97 STOPAFT=03
It will copy the last three records and put it in a file.
Cobol program can use this file containing records.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sandip
In cobol apply counter while reading file if counter reach at 97 start writing record to another file.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / harsha
Read file sequentially and load it in table. keep check on
the number of ocurances(i.e. number of records).
Once the table is fully loaded, you know the total
occurances. Say it is X. Now read the table with occurance
X-3
Is This Answer Correct ? | 2 Yes | 2 No |
Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?
12 Answers T systems, Tech Mahindra,
Mention the guidelines to write a structured cobol program?
In a program, variables are used but no DB2 involved in it. Can you call it as host variables??
What is the difference between CALL BY VALUE and CALL BY CONTENT?
Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY 'MAIN-PARA' PERFORM SECTION-A. STOP RUN. SECTION-A. PARA-A1. DISPLAY 'SECTION A PARA A1'. PARA-A2. DISPLAY 'SECTION A PARA A2'.
01 a pic 9(6) value is 123456 01 b pic 9(3) move a to b wht will be the value ?
We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the middle of the program B control wants to go program C,after completion of program C again control comes to program B and again after completion of program B control comes to program A.How the process will takes and what are the controls we use for that process.If it is possible anybody of you explain with example?
RENAME clause takes new SPACE in memory.TRUE or FALSE? a)TRUE 2)FALSE
Can JUSTIFIED be used for all the data types?
I want ALL ERROR codes in VSAM
3 Answers American Express, TCS,
which one is better among static call and dynamic call?
What is the use of EVALUATE statement?