Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, The below are few of the interview questions I've faced recently. Appreciate if you could provide answers. 1). What happens if you add a copybook to linkage section instead of adding it to a working-storage section in a sub-program? 2). There are select queries on a table in a COBOL-DB2 program. After pre-compilation, each select query is replaced by equivalent cobol statements. If you look at them, is it possible to find out which statement belongs to which query? 3). What is the basic consideration to use static / dynamic call and justification? 4). While writing a new COBOL program, how do you decide upon whether a varaible should be declared as COMP, COMP-1, COMP-2, COMP-3? What is the basis and justification? 5). A field of a DB2 table is updated. How do you test it? What is the we exactly look in the job to know whether the field is updated properly or not? 6). There are different calls in COBOL, Call by content, Call by value and Call by reference. Is it possible that a single CALL statement have all these varieties? When do you go for each one of these? What is the basis and justification? 7). When do we use null indicator of a field? Does the usage of it have any benefits? 8 ). What are the other ways of passing data to a JCL to program? (I know passing of data using PARM, Instream data and datasets). 9). Can you have multiple indexes on a table or array? What is the advantage? 10). What are the advantages of declaring the VARCHAR in 49 level in a COBOL-DB2 program? Please clear my doubts. TIA.
Post Follow-up to this messageIn article <1151911951.812281.136460@m73g2000cwd.googlegroups.com>, arrbee <arrbee@gmail.com> wrote: >Hi, > >The below are few of the interview questions I've faced recently. >Appreciate if you could provide answers. Please do your homework. DD
Post Follow-up to this message"arrbee" <arrbee@gmail.com> wrote in message news:1151911951.812281.136460@m73g2000cwd.googlegroups.com... > Hi, > > The below are few of the interview questions I've faced recently. > Appreciate if you could provide answers. And exactly what form will that 'appreciation' take...? > > 1). What happens if you add a copybook to linkage section instead of > adding it to a working-storage section in a sub-program? Nothing at all. For something to happen it would need to be referenced on the USING clause of the called Procedure Division. > 2). There are select queries on a table in a COBOL-DB2 program. After > pre-compilation, each select query is replaced by equivalent cobol > statements. If you look at them, is it possible to find out which > statement belongs to which query? Yes. > 3). What is the basic consideration to use static / dynamic call and > justification? As Doc would say: "Do whatever the person who signs your timesheets requires.". Both are justifiable... or not. > 4). While writing a new COBOL program, how do you decide upon whether a > varaible should be declared as COMP, COMP-1, COMP-2, COMP-3? What is > the basis and justification? Toss a coin. If it stands on edge, use Comp-2. > 5). A field of a DB2 table is updated. How do you test it? What is the > we exactly look in the job to know whether the field is updated > properly or not? The third sentence of this question is meaningless gibberish. You test whether the field was updated or not by using SPUFI, or running an SQL query against the table, or waiting until the cheques are processed... > 6). There are different calls in COBOL, Call by content, Call by value > and Call by reference. Is it possible that a single CALL statement have > all these varieties? Sure. ...call 'a-taxi' using by reference yellow-pages by value 'elite-taxis' by content group-of-drunks on overflow perform Fatty-gets-out-and-walks end-call When do you go for each one of these? When you're too drunk to walk home, obviously... What is the > basis and justification? Good question... (Launch into a diatrible about the pointlessness of existence and the lack of justification for Humanity to be here. Mention Nietzsche, Kant, Descartes, and Aristotle. At least 2 pages using both sides of the paper.) > 7). When do we use null indicator of a field? When YOU use it may be different form when I use it, so the 'we' is just confusing the issue. >Does the usage of it have > any benefits? None that are detectable, but, like the rest of the universe, all the evidence isn't in yet so it MIGHT prove to be valuable somewhere sometime... > 8 ). What are the other ways of passing data to a JCL to program? Another gibberish pidgin English sentence. No idea what this means. Maybe the test should be in Swahili...? Couldn't possibly ACCEPT this question as written... (I > know passing of data using PARM, Instream data and datasets). > 9). Can you have multiple indexes on a table or array? Only if you pay extra. >What is the > advantage? Nothing, apart from snob value. > 10). What are the advantages of declaring the VARCHAR in 49 level in a > COBOL-DB2 program? It means you don't have to declare it somewhere else...? (As Doc will no doubt observe, this is no answer...:-)) > > Please clear my doubts. Here in CLC? For free...!!!??? It's a job for your pschiatrist... > > TIA. > You're welcome... Pete.
Post Follow-up to this messageOn Tue, 4 Jul 2006 01:14:07 +1200, "Pete Dashwood" <dashwood@enternet.co.nz> wrote: > >As Doc would say: "Do whatever the person who signs your timesheets >requires.". Both are justifiable... or not. I wonder how commons shops are that don't have a standard for this.
Post Follow-up to this message"Howard Brazee" <howard@brazee.net> wrote in message news:nc8ia2l3ja3l1sj2tda7i0hfi3tlg349pd@ 4ax.com... > On Tue, 4 Jul 2006 01:14:07 +1200, "Pete Dashwood" > <dashwood@enternet.co.nz> wrote: > > > I wonder how commons shops are that don't have a standard for this. All those shops who code for "more work in the future" perhaps? After all, coding dynamic/static changes the number of programs which have to be changed or at the least recompiled when some business rule changes. Ooops! Never mind... anybody who has to ask this question probably doesn't think beyond the next coffee break anyway... MCM
Post Follow-up to this messageOn Mon, 03 Jul 2006 14:32:07 GMT, "Michael Mattias" <michael.mattias@gte.net> wrote: > >All those shops who code for "more work in the future" perhaps? After all, >coding dynamic/static changes the number of programs which have to be >changed or at the least recompiled when some business rule changes. I agree. Fortunately, I haven't worked at one. >Ooops! Never mind... anybody who has to ask this question probably doesn't >think beyond the next coffee break anyway... I assume you mean the first question above there.
Post Follow-up to this messageOf course, one scenario is absolutely legal - ie. When all top-level items in the copy book have the attribute BASED :-) Roger "Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag news:e8bfps$nh2$02$1@news.t-online.com... > > "Howard Brazee" <howard@brazee.net> schrieb im Newsbeitrag > news:u9gia25frunai9jid1c3320vcjrffcfbcf@ 4ax.com... > > :-) At least that. Referencing the fields might be an interseting problem > :-) > > Roger >
Post Follow-up to this messageIn other words, the answer is indeterminable without knowing the contents of the copy book :-) Roger "Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag news:e8bifd$6vu$01$1@news.t-online.com... > Of course, one scenario is absolutely legal - > ie. When all top-level items in the copy book have the > attribute BASED :-) > > Roger > > "Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag > news:e8bfps$nh2$02$1@news.t-online.com... > >
Post Follow-up to this messageOn Mon, 3 Jul 2006 18:14:44 +0200, "Roger While" <simrw@sim-basis.de> wrote: > >:-) At least that. Referencing the fields might be an interseting problem >:-) > >Roger I've never had any problem. Just remember that nothing's initialized by a VALUE clause in the LINKAGE SECTION.
Post Follow-up to this messagePete Dashwood wrote: > "arrbee" <arrbee@gmail.com> wrote in message > news:1151911951.812281.136460@m73g2000cwd.googlegroups.com... > > And exactly what form will that 'appreciation' take...? > Doc's injunction to do his own homework applies. I presume this chap/chappess is going for a job as a Cobol EXPERT rather than as a programmer. I scored 97% on the Tekcheck test for Cobol and would wonder why any one would ask the questions raised here. BTW, Pete, the following one of your answers is remiss in being incomplete in so far as it failed to mention the world's greatest philosopher, Homer (Simpson, that is). > > What is the > > Good question... (Launch into a diatrible about the pointlessness of > existence and the lack of justification for Humanity to be here. Mention > Nietzsche, Kant, Descartes, and Aristotle. At least 2 pages using both sid es > of the paper.) >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.