2) File opening modes and corresponding dispositions?.
3) what will happen if the file is opened in EXTEND mode and corresponding is equal to OLD in JCL?
4) A data set contains 1000 records. I want to browse particular record in FILE-AID?.
5) How many RDF it will contain?
70 70 80 80
6) How to load data to a table?
7) Quick response and response time in file-aid?
8) How to read last record in VSAM file. I don't know how many records are there?
9) Suppose there is COBOL-DB@ program. I made changes only in the COBOL program. Is there any need to recompile the DBRM again? why?
10) After bind, how can we run a cobol-db2 program?
11) write a JCL to sort a file. File is having 20 Chars, in that 1st word(5 chars) should be a secondary key, 2nd word (5 chars) should be a primary key?
12) why it is not possible to insert values in a table which is having primary key and index is not declared on that table?
Yes u cAN DISPLAY index for example
DISPLAY WS-EMPLOYEE-SALARY(WS-INDEX)
Gives the cooresponding index Value thru cobol program
If its a DB2 then
u can display index in DB2 using syscat.sysindexes & syscat.syskeys system tables
2) File opening modes and corresponding dispositions?.
U can open the file in INPUT, OUTPUT, I/O, EXTEND
3) what will happen if the file is opened in EXTEND mode and corresponding is equal to OLD in JCL?
In extend mode the records get appended at the end of the File while if u r using Old in a Jcl the what ever records which is actually present in the JCL get deleted and the new records get added to the file
4) A data set contains 1000 records. I want to browse particular record in FILE-AID?.
From File-Aid Main Menu Choose option Browse or Edit and press enter
give physical file name and copybook name and copy book path
Type 'T' and press enter
U will get another screen in that type either option 1 or 2 which will display the copybook layout
if u know any field value of that particular record,use that value and press PF3
If any record found it will display
5) How many RDF it will contain?
70 70 80 80
Can u make it clear.I guess there should be 2 RDF
6) How to load data to a table?
Use the Load Utility Or the image Copy for loading the data into the table
8) How to read last record in VSAM file. I don't know how many records are there?
Move highvalues to the key of the VSAM file and the issue Readnext record command. Then give Readprev command. This will read the last record
9) Suppose there is COBOL-DB@ program. I made changes only in the COBOL program. Is there any need to recompile the DBRM again? why?
U have precompile it again since during precompilation the DBRMS are being generated if ur not precopiling u will get a timestamp mismatch error -818
10) After bind, how can we run a cobol-db2 program?
Use the DB2 run utility IKJEFT01 and run the corresponding jcl
11) write a JCL to sort a file. File is having 20 Chars, in that 1st word(5 chars) should be a secondary key, 2nd word (5 chars) should be a primary key?
Sometimes a VSAM dataset does not get closed properly.This can happen if an update job abends, or someone is editing the data in TSO and their session times out or another failure occurs. If the dataset was not closed properly then it is possible that the end of file or the last key position is not indicated properly in the index.
To fix this problem you would use VERIFY, which will check the true end of file and last key. If there is a problem then VERIFY will update the VSAM file so that it is correct.