Hi everybody,
I have a DB2 query as follows . Basically it goes for a tablescan for TAB4 which is the table in the
subquery under NOT EXISTS. Can the whole query be replaced using INNER JOIN between TAB1,TAB2,TAB3
and a LEFT OUTER JOIN for TAB4 ? Could anyone help me in this ? Thank you...
Hi ,
I have three copy steps in a JCL each of them passing a set of parameter inputs.
Each copy step calls the same PROCLIB member that executes the COPY program.
Now I need to run the second step after the first one.How can this be done?
Because currently when I give more than one call to the...
Hi ,
I have a GDG having the current version as
NS10.RAD.CFILE.G0070V00 .
Can I access the 25th version of this GDG by writing
as
NS10.RAD.CFILE(25) ? Or
NS10.RAD.CFILE(-45) ..(70-45 = 25)
Because for current version, hope we can write something like
NS10.RAD.CFILE(0) .Also...
Hi ,
I have a DB2 SQL query like :
select a.col1,b.col1
from tab1 a, tab2 b
where a.col1=b.col1
and lower(a.col2) = <value>
how can i create an index on the function, lower(a.col2) so that the query uses the index.
currently index for a is on (col1,col2) but the query for a goes for a TBSCAN...
Hi ,
I have a DB2 SQL query like :
select a.col1,b.col1
from tab1 a, tab2 b
where a.col1=b.col1
and lower(a.col2) = <value>
how can i create an index on the function, lower(a.col2) so that the query uses the index.
currently index for a is on (col1,col2) but the query for a goes for a TBSCAN .
Hi ,
Can a dataset file be shrinked by removing data between specific column locations using REXX in Mainframes?
For eg.,consider a dataset having 4 records as ,
abc defghijklmnopqrs
abc defghijklmnopqrs
abc defghijklmnopqrs
abc defghijklmnopqrs
I would like to have the output file as ...
Hi ,
Can a dataset file be shrinked by removing data between specific column locations using REXX in Mainframes?
For eg.,consider a dataset having 4 records as ,
abc defghijklmnopqrs
abc defghijklmnopqrs
abc defghijklmnopqrs
abc defghijklmnopqrs
I want the output file to be ...
I was looking for performance improvement on this...
Is it possible ???
select a.col1 , a.col2
from tab1 a, tab2 b
where a.col3=b.col3
and a.col4 = <constant>
Could this query run better ?
select a.col1 , a.col2
from tab1 a, tab2 b
where a.col3=b.col3
and a.col4 = <constant>
a.col3=b.col3 is required because we need the output when a.col3 has a matching value for b.col3
can the below DB2 query be optimised ?
select dense_rank() over(order by emp_no)
from employee_role a
where grade = 1
and ( emp_status like '%3%' or emp_status like '%6%' or emp_status like '%4%' )
and entryid > (select COALESCE(max(entryid),a.entryid-1) from employee_role
where...
From the given table ,
COLA COLB COLC COLD
---- ---- ---- ----
1 4 a 1
2 6 s 2
4 9 d 3
3 17 e 1
5 11 f 2
6 15 r 3
I would like to retreive,
COLA COLB COLC
---- ---- ----
3 17 e
ie., values for COLA,COLB...
From the given table ,
COLA COLB COLC COLD
---- ---- ---- ----
1 4 a 1
2 6 s 2
4 9 d 3
3 17 e 1
5 11 f 2
6 15 r 3
I would like to retreive,
COLA COLB COLC
---- ---- ----
3 17 e
ie., values for COLA,COLB and COLC having max value for COLB .
I know we can use,
select...
I have a query as follows ,
SELECT DISTINCT A.COL1
FROM TAB1 A
WHERE A.COL2=constant
AND A.COL1 NOT IN
(SELECT B.COL1
FROM TAB2 B
WHERE B.COL1=B.COL1 )
can this be written in any other way to run better ?
Is there any other way to write the below query ?
======================================================
SELECT A.COL1 N1, A.COL2 N2, A.COL3 N3,
FROM TAB1 A
WHERE A.COL4 = CONSTANT
And A.COL5 =
(SELECT MAX (B.COL5) from TAB1 B
WHERE B.COL4 = CONSTANT
And A.COL1=B.COL1)...
Hi ,
The piece of code that I am executing is :
parse upper arg inpf
i=1
say i
say "dsname passed from jcl is:"
say inpf
"Alloc Fi(IO) Da('"inpf"') Shr Reu"
"Execio * DiskRU IO (Stem IO.)"
Do i = 1 to IO.0
IO.i = overlay(' ', IO.i, 1)
End
"Execio * DiskW IO (Stem IO. Finis)"
"Free Fi(IO)"...
My intention was to write
1. 2 space characters from column 3 for all records in the file.(ie, write space at column 3 and 4 in the file.)
2. 4 space characters from column 8 for all records in the file.(ie, write space at column 8,9,10,11 in the file.)
could you please help,me??
Thank...
I was facing a problem while executing a small piece of code written in REXX on Mainframes which had file operation functions like LINES(),LINEIN() and CHAROUT()
HERE is the REXX CODE :
-------------------------------------------------
parse upper arg inpf
i=1...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.