vaneesh khurana


{ City } pune
< Country > india
* Profession * software engineer
User No # 84460
Total Questions Posted # 0
Total Answers Posted # 43

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 139
Users Marked my Answers as Wrong # 66
Answers / { vaneesh khurana }

Question { HCL, 7372 }

how to increase the space of a dataset in instream procedure.


Answer

Simply override the parameter.

//STEP1 EXEC TESTPROC,
//STEP2.DD1 DD SPACE=(100,100)

Is This Answer Correct ?    1 Yes 1 No

Question { 5604 }

i have cobol+ db2 program but it contains n number of
subprograms for this how many dbrm members i need to
mention in bind process


Answer

Basically n+1, one for the main programs and n for n sub
programs.

Is This Answer Correct ?    4 Yes 0 No


Question { IBM, 6122 }

is it possible to get -811 error when you use cursors. why?


Answer

When you are fetching cursor without declaration.

Is This Answer Correct ?    1 Yes 0 No

Question { IBM, 6418 }

How to solve S0C7 abend with out using DISPlay in 10 mins?


Answer

1.compile and run the program,in the spool we can find the
offset value for the job. note that offset value and run
the same job again with compiler option as LIST.
2.see the spool for the offset value where it is
located,means exactly in which numerical operation that
abbend occured.EG: total = salary + commision.

Is This Answer Correct ?    4 Yes 2 No

Question { IBM, 6670 }

Parm value passed is PARM=(10,20). how do code linkage
section and how would you add these two passes values and
show result in cobol program.


Answer

LINKEAGE SECTION
01 WS-LINKEAGE SECTION.
05 WS-LINK-LENGTH PIC X(2).
05 WS-A PIC 9(2).
05 FILLER PIC X.
05 WS-B PIC 9(2).
PROCEDURE DIVISION USING WS-LINKEAGE-SECTION.

COMPUTE WS-B = WS-A + WS+B
DISAPLAY WS-B.

STOP-RUN.

Is This Answer Correct ?    5 Yes 2 No

Question { 5497 }

There is a variable with value 19446. Requirement is to
convert it to 194.46. I tried it by doing divide by 100 and
my receiving field data type is 9(03)v99. But the output is
194. I am not getting the decimal value. Could anyone pls
let me know how to get this done?


Answer

To make this we require to use redefines.

01 ws-value-change
05 WS-ALPHANUMERIC PIC X(5).
05 WS-NUMERIC REDEFINES WS-ALPHANUMERIC PIC 9(3)
V99.
011 WS-EDITED-NUMERIC PIC 9(3).99.

PROCEDURE DIVISION

MOVE '19446' TO WS-ALPHANUMERIC
MOVE WS-NUMERIC TO WS-EDITED-NUMERIC
DISPLAY WS-EDITED-NUMERIC

STOP RUN

You will get the value as 194.46

Is This Answer Correct ?    7 Yes 0 No

Question { TCS, 18120 }

what is the difference between perform varying and perform
until


Answer

Perform Varying:- Its a performing of loop using a working
storage variable having a predefined value and its
incremental or decremental value with each execution.

For Example

PERFORM PARA-A VARYING WS-A FROM 1 BY 1.

PERFORM UNTILL:- It is execution of a loop until a certain
condition is met. Please note that condition is checked
before the execution.

PERFORAM PARA-A UNTILL WS-A > 20.

Is This Answer Correct ?    2 Yes 3 No

Question { TCS, 9404 }

01 A pic 9(100) find record length of it


Answer

Friends even numeric size can be varied with
COMPILER DYNM option

Is This Answer Correct ?    0 Yes 2 No

Question { Syntel, 6554 }

using cursor how can you fetch more than one record into a
variable


Answer

Only single record is retrieved in the host variables with
each fetch.

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 5192 }

how to modify the copy book?explain with examples


Answer

COPY XYZCBOOK REPLACING WS-COPYBOOK BY WS-NEW

Is This Answer Correct ?    3 Yes 0 No

Question { 4426 }

I hv ten records in ps file and i hv say some 15 records in
vsam file .i hv empno and age in ps file n
empno,empname,dept n desig in vsam file. i hv 2 read the ps
file n check wid matching empno in vsam file and then
insert all fields from ps and vsam into db2 table....plz
help in writin the procedure division


Answer

File FD for PS
01 PS-FILE
05 PS-EMP-NO
05 PS-EMP-AGE
File FD for VSAM
01 VSAM-FILE
05 VSAM-EMP-NO-------->RECORD KEY
05 VSAM-EMP-NAME
05 VSAM-EMP-DEPT
PROCEDURE DIVISION

PERFORM UNTILL END OF PS FILE
READ PS FILE

READ VSAM-FILE KEY IS PS-EMP-NO
IF VSAM-FILE-STAUTS = '00'

EXEC SQL
INSERT INTO TABLE EMPLOY WITH VALUE 'PS-EMP-NO', 'PS-EMP-
AGE', 'VSAM-EMP-NAME' 'VSAM-EMP-DEPT'
END-EXEX
END-PERFORM.

Is This Answer Correct ?    4 Yes 0 No

Question { Mphasis, 7504 }

by using cursors , we can access particular records from
the table based on some condition, i want to delete those
selected records, how can we write a query for this in the
program?


Answer

Hi Satty
Can you please let us know what command you will use for
delete.
Vaneesh

Is This Answer Correct ?    0 Yes 0 No

Question { Mphasis, 7504 }

by using cursors , we can access particular records from
the table based on some condition, i want to delete those
selected records, how can we write a query for this in the
program?


Answer

By the way, why to select a signle row using cursor then
delete, if you want to delete all the row mentioned in the
cursor search creteria, simply write a SQL query mentioning
delete where (matching search condition).

Is This Answer Correct ?    0 Yes 2 No

Question { Cap Gemini, 45955 }

S9(5)V9(2) occupies how many bytes memory ?


Answer

Only 7 bytes will be occupied.
Sign 's' will be stored as Zooned decimal (punch char).
and V will be only an assumed decimal which is stored
internally.

Is This Answer Correct ?    2 Yes 1 No

Question { 4896 }

How can you display the SPOOL information ?


Answer

Simply write DISPLAY in the program.
and in the JCL write //SYSOUT DD SYOUT=*
This will display the the information which was coded with
the DISPLAY in the program.

Is This Answer Correct ?    1 Yes 0 No

Prev    1    [2]   3    Next