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
Questions / { vaneesh khurana }
Questions Answers Category Views Company eMail




Answers / { vaneesh khurana }

Question { TCS, 27533 }

Bind concepts in DB2 cobol


Answer

Awesome explanation in Easy language...

Is This Answer Correct ?    5 Yes 2 No

Question { EDS, 7476 }

i have a table like this :
Name ADDRESS
Toto 123 ...
Toto 456
ToTo 678

I would like to delete 2 last row...please tell me how to
delete its


Answer

I think better to perform this in following 2 queries

1. Select count(WS-COUNT) from TABLE;

2. DELETE FROM TABLE WHERE ROWCOUNT(*) IS WS-COUNT OR
(WS-COUNT-1);

Basically here the first row will give you the record count
and 2nd will delete the last and the 2nd last row.

Is This Answer Correct ?    0 Yes 2 No


Question { EDS, 5822 }

i have one file having 100 of records? i want to display it like
20 records in one column and 20 records in another column total
40 records per page ? how ?


Answer

You can do it by using SPLICING option of ICETOOL.

Is This Answer Correct ?    1 Yes 1 No

Question { TCS, 9676 }

how do u update the faltfile into db2 table ?


Answer

Also there is a option in FADB2 to load to table from flat
file using control card.
go to option 3.7

Is This Answer Correct ?    1 Yes 0 No

Question { Satyam, 11749 }

i have an employment table whch has salary,dept,name? i want
salary b/w 1000 to 5000 can anyone pls say the query for ths ?


Answer

Hi All

See the ques properly, he wants rows with salary bwtween
1000 to 5000. If one say between, it wont means inculsion
of 1000 and 5000 thus query will be

select * from employee where salary bwtween 1001 and 4999

Is This Answer Correct ?    0 Yes 1 No

Question { TCS, 10195 }

i want to store 20 digits . h will u do it in cobol ?


Answer

Just write PROCESS ARITH(EXTEND) before identification
division, you can use upto 9(31).

Is This Answer Correct ?    5 Yes 0 No

Question { CTS, 22934 }

If i initialize the 01 level variable in array, will it
initialize all the array elements (occurs)?


Answer

Hi All

we can intialize the array item by simply intialize 01
level. It is irrespective of occours, clause.

If we write INTITIALIZE XXX-YYY
it will initailize all the elements of the array
irrespective of its occourance.

Is This Answer Correct ?    4 Yes 1 No

Question { TCS, 13693 }

how many bytes timestamp token occupies?


Answer

Badically a Timestamp has 20 unsigned packed decimal digits
i.e. YYYYMMDDHHMMSSNNNNNN and thus occupy 10 bytes.

Is This Answer Correct ?    3 Yes 0 No

Question { Patni, 4713 }

what are the steps to sort in a cobol program?


Answer

SORT WORK-FILE ON
ASCENDING KEY AS WS-KEY1
DESCENDING KEY WS-KEY2
USING INPUT-FILE GIVING OUTPUT-FILE.

Is This Answer Correct ?    1 Yes 0 No

Question { 9408 }

input:-AABBCCDDEFGHIIJ
output:- ABCDEFGHIJ
Here in input we hav the duplicate characters i.e repeating
characters.SO we should eliminate the duplicate characters
and should display the output in ascending order.


Answer

Here I am considering INPUT to COBOL working storage
variable and not from file. (If it is input from file then
answer above by Adithya is right).

01 WS-INPUT PIC X(52) VALUE 'AABBCCDDEFGHIIJ.....ZZ'
05 WS-ALPHABET-INP PIC X OCCOURS 52 TIMES.

01 WS-OUPUT PIC X(26).
05 WS-ALPHABET-OUT PIC X OCCOURS 26 TIMES.

01 SUBSRIPTS
05 WS-SUBA PIC 9(2).
05 WS-SUBB PIC 9(2) VALUE 1.

PROCEDURE DIVISION.

PERFORM VARYING WS-SUBA FROM 2 BY 2 UNTIL WS-SUBA > 52

MOVE WS-ALPHABET(WS-SUBA) TO WS-ALPHABET-OUT(WS-SUBB)

ADD +1 TO WS-SUBB

END-PERFORM.

DISPLAY WS-OUPUT

STOP RUN.

Is This Answer Correct ?    0 Yes 1 No

Question { iGate, 9177 }

how can you identify wheather the program is using search
or search all in the cobol program?


Answer

In addition to above, it is required to provide index some
value using SET.

SET IDX to 1.

Is This Answer Correct ?    0 Yes 0 No

Question { Syntel, 11119 }

what is the syntax for FOR UPDATE CLAUSE in cursor
declaration and how can u update using cursor? is it
possible to update multiple rows at a time.


Answer

If one wants to update multiple rows simply write a querry,
instead of using cursor.

Is This Answer Correct ?    3 Yes 0 No

Question { 10160 }

What is error -818 in db2.
where can you find the timestamp of the DBRM and the source
code.( precompile puts the timestamp on dbrm and source code
correct?)


Answer

The error -818 is due to timestamp mismatch of the DBRM and
the source code. Basically same time stamp is marked in
DBRM and source code during pre compilation.

Is This Answer Correct ?    4 Yes 0 No

Question { Cap Gemini, 10100 }

what is the differences between spufi and qmf and which is
better?


Answer

Hi Hrushikesh
Can we get the location of error code usign QMF.
Vaneesh

Is This Answer Correct ?    1 Yes 0 No

Question { IBM, 8489 }

I have two files , file1 is input file it contains
10,20,30,....,records
but i want to display the records in file 2 as reverse order
.how can we do by using jcl& cobol(dont use array)
please any one can tell me the answer


Answer

We can sort the input file in descending order usign DFSORT

sort fields=(1,3,CH,D)

then simply read the sorted file in the program and display
it in the spool.

Is This Answer Correct ?    2 Yes 2 No

 [1]   2   3    Next