Default language.

Information
Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Unload for Db2 13.1.

Complex SQL, DIRECT YES


This example uses a subquery from another table, and date arithmetic.

Specifying DIRECT YES is not required as it is the default.

Information
Example
//UNLOAD   EXEC PGM=NGTUTIL,PARM='ssid,,NORESTART'          
//*                                                         
//UTPRINT   DD SYSOUT=*                                     
//SYSPRINT  DD SYSOUT=*                                     
//SYSTSPRT  DD SYSOUT=*                                     
//OBJREPRT  DD SYSOUT=*                                     
//*                                                         
//SYSIN     DD *                                           
 OUTPUT SYSREC  DSNAME hlq.OUTDATA.&TS..P&PART..T&TIME
 UNLOAD                                                   
   DIRECT YES                                             
      SELECT * FROM creator.table01                    
       WHERE COL01 IN                                     
         (SELECT col01 FROM creator.table02            
           WHERE col26 < CURRENT_DATE - 6 MONTHS)
/*

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Unload for Db2 12.1