Ü  QCMDEXC

 

·         This is an API to execute command from HLL.

·         We can change the command at run time.

·         The commands that are only used in CL program are not permissible here.

·         Below is the process on how to use this API.

 

D CMD             S              1    DIM(75) CTDATA PERRCD(75)
D CMDLEN          S             15 5
C                   EVAL      CMDLEN = %LEN(%TRIM(CMD))
C* Execute Command  using QCMDEXC
C                   CALL      'QCMDEXC'
C                   PARM                    CMD
C                   PARM                    CMDLEN

 

 

Example

 


0010.00 DCMDDSC           S            256A                                   
0011.00 DCMDLEN           S             15P 5                                
0040.00      C                   Eval      CMDDSC='DLTDTAQ DTAQ(IROBO1/DTAQ000)'
0041.00
0042.00      C                   Eval      CMDLEN=%len(%trim(CMDDSC))
0043.00      C                   CALL      'QCMDEXC'
0044.00      C                   PARM                    CMDDSC
0045.00      C                   PARM                    CMDLEN

 

 

OUTPUT

 

Data queue DTAQ000 is deleted from IROBO1.










User Comments:



Subscribe

  Email:



Copyright © www.go4as400.com, 2013-2017. Copyright notice