IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can you display the Index?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SMRAJAESWARI

New User


Joined: 07 Jul 2005
Posts: 10

PostPosted: Fri Jun 02, 2006 1:15 pm
Reply with quote

Hello Friends,

Please let me know the answer for these questons.


1) Can you display the Index?

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?

13) what is the use of VERIFY in VSAM?.


Regards,
Raji.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Jun 06, 2006 3:07 pm
Reply with quote

1) Can you display the Index?

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?

//jobcard
//Step1 exec pgm=sort
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=File1,DISP=SHR
//SORTOUT DD DSN=FILE2,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(6,5,CH,A,1,5,CH,A)
/*


13) what is the use of VERIFY in VSAM?.

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.


Correct me if i am wrong icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Cobol file using index COBOL Programming 2
No new posts How to display the leading zeros of a... DB2 7
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
No new posts SDSF display Max-RC in different colors TSO/ISPF 4
No new posts Add column to existing records using ... JCL & VSAM 2
Search our Forums:

Back to Top