IBM Support

QSYS2.GENERATE_SQL() procedure

News


Abstract

The GENERATE_SQL procedure generates the SQL data definition language statements required to recreate a database object.

Content

The GENERATE_SQL procedure generates the SQL data definition language statements required to recreate a database object. The results are returned in the specified database source file member or as a result set.
See the procedure definition for details: GENERATE_SQL procedure

 
  • Generate DDL to tune the System Limits pruning variable:
    CALL QSYS2.GENERATE_SQL ('QIBM_SYSTEM_LIMITS_PRUNE_BY_OBJECT', 'SYSIBMADM', 'VARIABLE',
    REPLACE_OPTION => '0',
    CREATE_OR_REPLACE_OPTION => '1');


    Figure 1. Generate_SQL() example output:

    image-20200115130716-1
 

Enhanced with IBM i 7.4 SF99704 Level 13 and IBM i 7.3 SF99703 Level 24:

  • Add the ability to generate into an IFS stream file

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
12 April 2021

UID

ibm11164760