HASH JOIN use in DB2 Queries

A DB2 Hash Join is a type of join operation that uses a hash table to match rows from two or more tables. It is particularly beneficial when joining large tables or when the join condition involves non-indexed columns. The basic idea is to divide the rows of each table into small groups, called “buckets,”

HASH JOIN use in DB2 Queries Read More »

FILEAID in Batch Mode with Examples

FILEAID is an interactive software product that increases data processing productivity in both program development and daily file and records maintenance. It is a data manipulation program that consolidates the functions of many standard IBM utilities. FILE-AID combines the data and file processing of the following nine IBM utilities into one tool.These utilities are IDCAMS, IEBGENER,

FILEAID in Batch Mode with Examples Read More »

SORT DATE Functions with Examples

Using SORT DATE Functions you can dynamically insert the date, like ‘yyyy-mm-dd’ or any format instead of a constant date like ‘2021-01-01’. There are multiple Date Functions by which you can reformat input dates. By using INREC, OUTREC, and OUTFIL statements to insert the current date or past date, or future date in a variety

SORT DATE Functions with Examples Read More »

IEFBR14 JCL Utility

Convert Date DDMMMYY to MM/DD/YY Format

DFSORT doesn’t have a built-in function for Convert Date – interpreting the month field of date in DDMMMYY formats as numeric values but you can use INREC and OUTREC statements to translate the month back and forth. Let’s take an example assuming that the DDMMMYY date is in positions 1-7. BUILD=(3,3, 3,3, CHANGE=(2,C’Jan’,C’01’,C’Feb’,C’02’,C’Mar’,C’03’,C’Apr’, C’04’,C’May’,C’05’,C’Jun’,C’06’,C’Jul’,C’07’,C’Aug’,C’08’, C’Sep’,C’09’,C’Oct’,C’10’,C’Nov’,C’11’,C’Dec’,C’12’),

Convert Date DDMMMYY to MM/DD/YY Format Read More »

SQL wildcards use in Queries

SQL wildcards are used to substitute one or more characters in a string. We use SQL wildcards when we need to search for complex data. This complex data could compromise strings or numerical with special characteristics. Wildcards also come in handy when we want to speed up our querying process. The results are considerably fast

SQL wildcards use in Queries Read More »

HAVING Clause in DB2 SQL Queries

HAVING clause is used to apply a filter on the result of  GROUP BY based on the specified condition. The conditions are Boolean type i.e. use of logical operators(AND, OR). This clause was included in SQL as the WHERE keyword failed when we use it with aggregate expressions. It is a very generally used clause in SQL. Similar to WHERE

HAVING Clause in DB2 SQL Queries Read More »

OUTREC control statement use in SORT

OUTREC control statement is used to reformat (adds, deletes, or reformats fields) each record after they are sorted, merged, or copied by specifying all of its items one by one. This statement supports a wide variety of parsing, editing, and reformatting tasks. We can even add spaces/zeroes/any character into the output record based on the requirement.    

OUTREC control statement use in SORT Read More »

Scroll to Top