Global Guideline. http://www.globalguideline.com/ IBM MainFrame Interview Questions And Answers IBM MainFrame Job Interview Preparation Guide. Question # 1 How to fetch even records from one file to another file by using ICETOOL in JCL? Answer:- //STEP1 EXEC PGM=SORT //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTIN DD DSN=INPUT.DATA,DISP=SHR //OUTDATA DD DSN=OUTPUT.DATA,DISP=(NEW,CATLG,DELETE) . . . //SYSIN DD * OPTION COPY OUTFIL FNAMES=OUTDATA,SAMPLE=2 THIS WILL COPY ALL EVEN RECORDS ------------------------------------------- FOR ODD RECORDS OUTFIL FNAMES=OUTDATA,STARTREC=1,SAMPLE=2 Read More Answers. Question # 2 File1 has 100 records and file2 has 200 records i want to copy 50 records which r in both file into file3? Answer:- First need to sort both files READ FILE1 READ FILE2 PERFORM UNTIL EOF = 'Y' IF FILE1-ID > FILE2-ID THEN READ FILE2 AT END MOVE 'Y' TO EOF ELSE IF FILE1-ID < FILE2-ID READ FILE1 AT END MOVE 'Y' TO EOF ELSE IF FILE1-ID = FILE2-ID WRITE FILE3 READ FILE1 AT END MOVE 'Y' TO EOF READ FILE2 AT END MOVE 'Y' TO EOF END-PERFORM Read More Answers. Question # 3 What is use of linkage section? Answer:- Linkage section is used to accept data from outside the program.either its parm part of Jcl or Call from any other programs,they pass data into called program thru linkage section only. Read More Answers. Question # 4 What is difference between comp and comp-3? Answer:- Comp is binary.its the type how system stores ur data. pic s9(1)-->pics9(4) --occupies 2bytes pic s9(5)---pic s9(8) ----4 bytes Copyright http://www.GlobalGuideline.COM Page 2/8 IBM MainFrame Interview Questions And Answers pic s9(9)---pics9(18)-----8 bytes comp-3 is for packed decimal data where each character occupies half byte and sign is stored in last nibble. Read More Answers. Question # 5 How do define Dynamic array in COBOL how do u define single dimensional array and multidimensional array in your COBOL? Answer:- In IBM Cobol 1) In IBM's Language Environment you can dynamically acquire storage (look up HEAP in the manual). The storage you acquire you can use as you like. Can be an array, therefore a dynamic array. It is a "work-around" as dynamic arrays are not directly supported. 2) 01 SINGLE-DIM-ARRAY 05 SDA-ITEM PIC X OCCURS 30. A single-dimension array of thirty one-byte characters. 3) 01 MULTI-DIM-ARRAY. 05 MDA-FIRST-DIM OCCURS 20. 07 MDA-SECOND-DIM OCCURS 30 PIC X. A multi-dimension array of 20 times 30 one-byte characters. Read More Answers. Question # 6 How To get the last record in VSAM file in cluster? And How can u get the ksds file records into ur COBOL program? Please tell me about these two questions.? Answer:- 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. In VSAM, there is one command HURBA, Using that we can read the last record, If you want to know more about go to IBM RED BOOKS. You will get the solution. by using the HURBA we can get the max records by using the CKD count key data we will get the last record Read More Answers. Question # 7 Tell about How do u eliminate the duplicates? Answer:- By using DFSORT we can eliminate the duplicates //Sysin dd * sort fields=(1,5,ch,A) sum fields= /* // in the above dfsort we use sum fields= empty then it eliminate the duplicates if u want all dupli.in one file u can use sum fields = xsum........ Read More Answers. Question # 8 What is difference b/w file-aid tool and file-aid utility? Answer:- File-aid tool is online tool (application) used for processing files using online screens. File-aid utility is used in jcl for processing files in batch. Read More Answers. Question # 9 How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling JCL? Answer:- //PROC1 PROC //STEP1 EXEC PGM=IEFBR14 //DD1 DD DSN=XYZ, DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY // PEND //JJJ JCLLIB ORDER=PROCLIB PATH //PROC2 PROC //STEP2 EXEC PROC1 Copyright http://www.GlobalGuideline.COM Page 3/8 IBM MainFrame Interview Questions And Answers //JOBNAME JOB PARAMETERS //JJJ JCLLIB ORDER=PROCLIB PATH //PROC3 PROC //STEP2.DD1 DSN=NEW NAME,DISP=SHR THIS IS D WAY.... THIS PROG. WILL DO NOTHING IT'S JUST AN EXAMPLE Read More Answers. Question # 10 if a pic 9(3) value 354,b pic x(2) value 46 thena)a>b2)a<b3)error Answer:- As picture clause for variable b is x(2), which means that it can accept both numeric and characters of length 2, but the care we should take here is that we should enclose them in the single quotes, therefore to my expectation option b is write. Read More Answers. Question # 11 Suppose oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records in both files copy all the common records into oza017.myorg.xyz dataset? Answer:- IN SORT, YOU CAN USE JOINKEYS AND CAN TAKE 50 COMMON RECORDS IN B/W 2 I/P FILES AND WRITE TO O/P FILE. Read More Answers. Question # 12 A job has 150 steps i want to execute only 57th step? Answer:- it's easy write restart=step57 in job parameter and write cond in 58th step like cond = (x,eq) where x is expected return code of 57th step. Read More Answers. Question # 13 A job has 90 steps i want to execute only step7 and step15? Answer:- In the jobcard, Give restart=step7, code cond=(0,le) from step8 - step14, Give a null stmt(//) after step15. That's it your requirement is met. Simplest way: There is an utility IEBEDIT which is used to execute only few particular steps from 'n' steps in a jcl. //JOBCARD //STEPNAME EXEC PGM=IEBEDIT //SYSUT1 DD DSN=MYPRGM.DSN,DISP=SHR //SYSUT2 DD SYSOUT=(*,INTRDR) //SYSIN DD * EDIT TYPE=INCLUDE STEPNAME=(STEP7,STEP15) /* // MYPRGM.DSN = The name of the dataset that has the actual JCL. Read More Answers. Question # 14 WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH? Answer:- First thing is we can see this kind of differece only in VB files not in fixed block files. LRECL of VB file will contain the maximum record length of a file + 4 bytes RDW(Record Descriptor Word) field which gives the length of the record as the file contains variable record lengths. Copyright http://www.GlobalGuideline.COM Page 4/8 IBM MainFrame Interview Questions And Answers Example : if we have EMP-FILE VB file which contains 80 THRU 100 CHARECTERS So the LRECL of this file is going to be 100+4 which is 104 bytes. Read More Answers. Question # 15 What are the parameter we cannot use in procedure? How many instream we can write in single jcl? Can we call instream to catalog and catalog to instream? Answer:- sysin dd * we cannot use in procedure,15 instream proc we can code.we can call instream to catalog.but we cannot call catalog to instream Read More Answers. Question # 16 While creating a table, by mistake you have given size of one field as 10. But as per requirement size should be 8. What is your next step? Answer:- If table is empty then we alter this column to any length, but if some data got inserted into the table then we can also decrease the column length upto largest data size available in that perticulat column. Read More Answers. Question # 17 Suppose I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to retrieve a column data from B table. How will you write a query? Answer:- One can use Inner Join to get data from two tables. Read More Answers. Question # 18 How can we increment subscript and index? Answer:- SUBCRIPT: CAN BE INCREMENT OR DECREMENT USING ARITHMETIC OPERATIONS INDEX: CAN BE INCREMENT OR DECREMENT USING SET VERB Read More Answers. Question # 19 We have an output dataset in job with disp parameter as SHR. Can we write data in that file dataset? Answer:- we cannot write when disp is share Read More Answers. Question # 20 select distinct(empid),distinct(dept),namefrom EMPwill the above query work? Answer:- No, It will not work. SELECT DISTINCT works only for single cloumn. DISTINCT can be applied multiple times only when you want to apply aggregate functions such as COUNT, AVG & SUM. e.g. SELECT COUNT(EMPNO)/COUNT(DISTINCT(WORKDEPT)), COUNT (DISTINCT(JOB)) FROM DSN8810.EMP Read More Answers. Question # 21 How to handle -911 (deadlock) error in a db2 program so that the program will never abend? Answer:- Dead lock time out erro occurs in the following case: If two or more programs acquired exclusive lock on the data,which may be needed for other programs without that Copyright http://www.GlobalGuideline.COM Page 5/8 IBM MainFrame Interview Questions And Answers data which can not proceed further. Solution: You can roll back current unit of work for one of the programs after preset time interval for deadlocks and terminate that program. Read More Answers. Question # 22 Suppose I have 1000 rows in a db2 table. I want to update first 100 records, How do I do it? Answer:- is there identity column in this table, for example, if there is a column indexnum int(supposed start from 1), you can use the Update Table Set XXX=XXX where indexnum < 101 Read More Answers. Question # 23 Can 88 level variable be declared in FD section? Answer:- yes Read More Answers. Question # 24 How would find total records in files using seqientional? Answer:- We can increment the count for each reading of record in a file. Read file count = count + 1 At end display count Read More Answers. Question # 25 What is label record is standard or omitted in file description of data division? Answer:- Label record is standard means it will use disk files. But tape files can have standard label too. If the label record is omitted it should be a the tape file without any begin and end blocks on the tape. Read More Answers. Question # 26 i need the code for this program in cobol.2+1=34+3=76+5=118+7=1510+9=19 Answer:- do a loop on below equation . Varying n from 1 to required value (2n) + (2n-1) Read More Answers. Copyright http://www.GlobalGuideline.COM Page 6/8 Mainframes Most Popular Interview Topics. 1 : IMS DB Frequently Asked Interview Questions and Answers Guide. 2 : CICS Frequently Asked Interview Questions and Answers Guide. 3 : JCL Frequently Asked Interview Questions and Answers Guide. 4 : VSAM Frequently Asked Interview Questions and Answers Guide. 5 : IDMS Frequently Asked Interview Questions and Answers Guide. 6 : IBM AS400 Frequently Asked Interview Questions and Answers Guide. 7 : IBM COBOL400 Frequently Asked Interview Questions and Answers Guide. 8 : IBM Assembler Frequently Asked Interview Questions and Answers Guide. 9 : IBM DB400 Frequently Asked Interview Questions and Answers Guide. 10 : IBM RPG400 Frequently Asked Interview Questions and Answers Guide. About Global Guideline. Global Guideline is a platform to develop your own skills with thousands of job interview questions and web tutorials for fresher's and experienced candidates. These interview questions and web tutorials will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. Global Guideline invite you to unlock your potentials with thousands of Interview Questions with Answers or begin a tutorial right away, such as HTML, XML, XSLT, Cascading Style Sheet (CSS), Search Engine Optimization (SEO), JavaScript, Structure Query Language (SQL), Database Articles, Web Hosting Guide and much more. Learn the most common technologies Interview Questions and Answers. We will help you to explore the resources of the World Wide Web and develop your own skills from the basics to the advanced. Here you will learn anything quite easily and you will really enjoy while learning. Global Guideline will help you to become a professional and Expert, well prepared for the future. * This PDF was generated from http://www.GlobalGuideline.com at June 19th, 2013 * If any answer or question is incorrect or inappropriate or you have correct answer or you found any problem in this document then don't hesitate feel free and e-mail us we will fix it. You can follow us on FaceBook for latest Jobs, Updates and other interviews material. www.facebook.com/InterviewQuestionsAnswers Follow us on Twitter for latest Jobs and interview preparation guides http://twitter.com/InterviewGuide Best Of Luck. Global Guideline Team http://www.globalguideline.com [email protected]