• SQL AVG Column Function: How to Use it

    The SQL AVG function computes the average of the values for the column( or expression) specified as an argument. We should not give AVG function on CHAR arguments. This function operates only on numeric arguments. The following example calculates the average salary of each department: SELECT WORKDEPT, AVG(SALARY) FROM DSN81010.EMP GROUP BY WORKDEPT; The AVG…

  • JCL Ideas: How to Restart a step Using Checkpoint

    In this post you will know how to restart a step using checkpoint in JCL. Even Though checkpoint concept is little tricky, you have an option to use it.

  • DB2 Questions on Primary Key, View , Static SQL and Dynamic SQL

    What’s the advantage of using a view? By using views, you can set up different presentations of the same data. Each view is derived from the actual table data, but each user will see a subset of the data. The main benefit to using views is that they allow you to control the access your…

  • DB2 Numeric, String, Date, Time Data types

    Here is a discussion on DB2 supported data types. Explained each for ready reference. Numeric Data types: SMALLINT: As the name suggests, the smallest numeric data type that DB2 supports. These values use 2 bytes of storage (16 bits) and are interpreted as 2s-complement signed numbers, providing a range between -32768 and 32767. INTEGER: A…

  • DB2 Stored Procedure: How to Call Easy Syntax

    What is the role of stored procedure in DB2 Workloads in a client/server environment can be moved from the client to the sever by creating one or more stored procedures. Once a stored procedure has been created and registered with a database (by executing the CREATE PROCEDURE SQL statement), that procedure can be invoked, either…

  • DB2 Tutorial For Software Developers (5 of 5)

    The best DB2 tutorial that covers index, synonyms,alias and DCLGEN. Read more.

  • How to Write COBOL Logic for DB2 VARCHAR Field

    Real usage of VARCHAR in DB2 is to store variable data. Explained in this post how to use it in COBOL programs.

  • How to Create Tape Dataset in JCL

    JCL Tape datasets and its parameters with syntax

  • DB2 Catalog Tables Where Accessing of Remote System Updated

    Catalog tables listed in this post where you need to look in about remote system details.

  • How to Copy File to Multiple Files using ICETOOL

    Combining ICETOOL with DFSORT in Mainframe JCL. Best DFSORT examples so you can simplify your JCL code.

  • ICETOOL Complete Tutorial Alternative to DFSORT

    The complete basics about ICETOOL. The details are highly useful for beginners in ICETOOL. This is the best alternative tool to DFSORT.

  • DB2 SQL – Perfect Way to Use Conditions in WHERE

    Best rewriting SQL query methods to improve Query performance. First write Split predicates out if possible: SELECT DEPTNO, DEPTNAMEFROM DEPTWHERE (ADMRDEPT = ‘E01’AND DEPTNAME LIKE ‘BRANCH%’)OR (DEPTNO = ‘D01’AND DEPTNAME LIKE ‘BRANCH%’)can also be tried as: Second write SELECT DEPTNO, DEPTNAMEFROM DEPTWHERE (ADMRDEPT = ‘E01’ ORDEPTNO = ‘D01’)AND DEPTNAME LIKE ‘BRANCH%’The idea here is to…