Thursday, November 10, 2011

Use of QCMDEXC

By calling QCMDEXC application program interface we can execute a CL command with in an RPG Program.
I am just giving  you the one example of  QCMDEXC
****************************************************************************
D XCMD               S                  80
D XCMDL             S                  15 5
C                         Z-ADD           80          XCMDL           15 5
C                         EVAL             XCMD = 'OVRDBF FILE(ABCDEF) TOFILE(ABC) +
C                                                                                       OVRSCOPE(*JOB)'
C
C                          CALL            'QCMDEXC'                 50
C                          PARM           XCMD
C                          PARM           XCMDL
C                          SETON         LR
****************************************************************************