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.

Unload with data conversion using scalar functions


This example shows the use of scalar functions to convert column data. It adds two numeric columns and extracts the month and day characters from a DATE column.

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 col01 + col10,
             SUBSTR(CHAR(DATE(col02)),6,10)
        FROM creator.table                            
       WHERE col01 < 20                                    
/*

 

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

BMC AMI Unload for Db2 12.1