Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: leo6
  • Content: Threads
  • Order by date
  1. leo6

    DB2 SQL query

    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...
  2. leo6

    Executing JCL steps

    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...
  3. leo6

    Accessing GDGs

    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...
  4. leo6

    Function-based indexes in DB2

    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...
  5. leo6

    Function-based indexes in DB2

    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 .
  6. leo6

    Shrink a dataset to smaller column length

    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 ...
  7. leo6

    Shrink a dataset file to smaller column length

    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 ...
  8. leo6

    For execution performance

    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>
  9. leo6

    Query for optimization

    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
  10. leo6

    SQL Query

    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...
  11. leo6

    Can JOIN be used to select MAX instead of subselect?

    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...
  12. leo6

    Select specific Columns for MAX value of a column

    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...
  13. leo6

    query subselect

    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 ?
  14. leo6

    Selecting details of the record having MAX value for a particular col

    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)...
  15. leo6

    File Operations in REXX

    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)"...
  16. leo6

    File Operations in REXX (contd.)....

    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...
  17. leo6

    File operations in REXX

    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...

Part and Inventory Search

Back
Top