IBM Support

QSYS2.QCMDEX() procedure no longer requires a command length

News


Abstract

QSYS2.QCMDEX() procedure no longer requires a command length

Content

You are in: IBM i Technology Updates > Db2 for i - Technology UpdatesDb2 for i Functional Enhancements > QSYS2.QCMDEX() procedure no longer requires a command length

The QSYS2.QCMDEXC() procedure can be used to execute IBM i commands.  This enhancement delivers a variant of this procedure where the only parameter passed is the command string.

The previous style of QCMDEXC procedure remains valid and supported.  
The new version of the QCMDEXC procedure is simpler to use.


The QCMDEXC procedure executes a CL command.


>>-QCMDEXC--(--CL-command-string--)---------------------------->< 

The schema is QSYS2.

  • CL-command-string
    A character string expression containing a CL command.

The CL-command-string will be run as a CL command.

Examples

  • Using SQL naming, call the QCMDEXC procedure to add a library to the library list.
    CALL QSYS2.QCMDEXC('ADDLIBLE PRODLIB2');
  • Using SYSTEM naming, call the QCMDEXC procedure to add a library to the library list using an expression.
    DECLARE V_LIBRARY_NAME VARCHAR(10);
    SET V_LIBRARY_NAME = 'PRODLIB2';
    CALL QSYS2/QCMDEXC('ADDLIBLE ' CONCAT V_LIBRARY_NAME);

[{"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":"LOB57","label":"Power"}}]

Document Information

Modified date:
15 January 2020

UID

ibm11167298