sriram


{ City } bangalore
< Country > india
* Profession * se
User No # 13301
Total Questions Posted # 0
Total Answers Posted # 11

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

Users Marked my Answers as Correct # 46
Users Marked my Answers as Wrong # 21
Questions / { sriram }
Questions Answers Category Views Company eMail




Answers / { sriram }

Question { T systems, 41624 }

Can we move SPACES to numeric field and ZEROES to
alphabetic field? If yes what are the way doing this?


Answer

NO.
Only Alphanumiric field allow numric or alphabetic or both.

Is This Answer Correct ?    10 Yes 1 No

Question { DSRC, 117069 }

Wrete a JCL to compare two files and mached records move to
onc file & un mached rows wants to another file?


Answer

Hi
i need the cobol Program, I don't want the jcl.
Any one can help me out.

Is This Answer Correct ?    11 Yes 14 No


Question { Patni, 17547 }

How to createing new version of GDG with out loosing the
data in preaves GDG version?


Answer

GDG reached it's limitation so but i want to add some more
data to that file.

Is This Answer Correct ?    2 Yes 4 No

Question { IBM, 3996 }

in GDG: is it poosible to copy records from a file which
utilizes some 100 cylinders to a gdg whose model is defined
as trk(1,0) and also it possible to copy 100 bytes file to
80 bytes file?


Answer

It is possible but we losse data.

Is This Answer Correct ?    3 Yes 0 No

Question { IBM, 14805 }

What is usage pointer in cobol?


Answer

Declare a pointer as an elementary data item bearing the
USAGE IS POINTER clause, with no PICTURE. E.g:
05 EXAMPLE-P USAGE IS POINTER.

EXAMPLE-P is a four-byte field which can store the address
of any data item. Unless you're interfacing COBOL to
Assembler or something, you really don't care what the
pointer looks like internally. It's just a piece of magic
which enables you to access the thing it's pointing to.



Please let me know if I am wrong

Is This Answer Correct ?    0 Yes 2 No

Question { 4813 }

Could anyone clearly explain the diference between sub
query and correlated sub query?


Answer

Correlated subquery runs once for each row selected by the
outer query. It contains a reference to a value from the
row selected by the outer query.

Nested subquery runs only once for the entire nesting
(outer) query. It does not contain any reference to the
outer query row.

For example

Correlated Subquery:

select e1.empname e1.basicsal e1.deptno from emp e1 where
e1.basicsal (select max(basicsal) from emp e2 where
e2.deptno e1.deptno)

Nested Subquery:

select empname basicsal deptno from emp where (deptno
basicsal) in (select deptno max(basicsal) from emp group by
deptno)



Please let me know if I am wrong...............

Is This Answer Correct ?    1 Yes 0 No

Question { 4813 }

Could anyone clearly explain the diference between sub
query and correlated sub query?


Answer

Correlated subquery runs once for each row selected by the
outer query. It contains a reference to a value from the
row selected by the outer query.

Nested subquery runs only once for the entire nesting
(outer) query. It does not contain any reference to the
outer query row.

For example

Correlated Subquery:

select e1.empname e1.basicsal e1.deptno from emp e1 where
e1.basicsal (select max(basicsal) from emp e2 where
e2.deptno e1.deptno)

Nested Subquery:

select empname basicsal deptno from emp where (deptno
basicsal) in (select deptno max(basicsal) from emp group by
deptno)



Please let me know if I am wrong...............

Is This Answer Correct ?    2 Yes 0 No

Question { IBM, 10153 }

how to check the table is empty or not?


Answer


EXEC-SQL
SELECT 1
INTO :X
FROM TAB1
END-EXEC
X is defined as s9(4) comp value zeroes
So, if there is a row in the table (i.e. the table is not
empty), 1 gets moved to variable X.
Did not have resources to run the query and validate ,



Please let me know if I am wrong

Is This Answer Correct ?    0 Yes 0 No

Question { IBM, 10153 }

how to check the table is empty or not?


Answer


EXEC-SQL
SELECT 1
INTO :X
FROM TAB1
END-EXEC
X is defined as s9(4) comp value zeroes
So, if there is a row in the table (i.e. the table is not
empty), 1 gets moved to variable X.
Did not have resources to run the query and validate ,



Please let me know if I am wrong

Is This Answer Correct ?    0 Yes 0 No

Question { IBM, 7777 }

what is the difference between where clause and having clause


Answer

WHERE clause is used to impose condition on SELECT
statement as well as single row function and is used before
GROUP BY clause where as HAVING clause is used to impose
condition on GROUP Function and is used after GROUP BY
clause in the query

WHERE applies to rows HAVING applies to summarized rows
(summarized with GROUP BY) if you wanted to find the
average salary in each department GREATER than 333 you
would code:

SELECT DEPARTMENT AVG(SALARY)

FROM EMP

WHERE DEPARTMENT > 333

GROUP BY DEPARTMENT

IF you then wanted to filter the intermediate result to
contain departments where the average salary was greater
that 50 000 you would code:

SELECT DEPARTMENT AVG(SALARY)

FROM EMP

WHERE DEPARTMENT > 333

GROUP BY DEPARTMENT

HAVING AVG(SALARY) > 50000.

Where executes first

GROUP BY next

and finally HAVING



Is This Answer Correct ?    9 Yes 0 No

Question { TCS, 9225 }

In cobol+DB2program if the code of cobol program has changed
than i have to do precompilation once again?


Answer

If we make any changes in COBOL + DB2 Proram we need to do
precompilation once again.

Let me know if I am wrong

Is This Answer Correct ?    8 Yes 0 No