IBM Support

Example of How to Call the QCMDEXC API from ACS Run SQL Scripts

Troubleshooting


Problem

This document includes an example of how to call the QCMDEXC API from ACS Run SQL Scripts 

Resolving The Problem

To call the QCMDEXC API from Run SQL Scripts in Access Client Solutions (ACS) , use the following steps:

1. Launch and connect your ACS session to your server
2. Select ACS menubar -> Actions  -> select Run SQL Scripts
image-20241114171151-1

In this sample the objective is to change a job's message queue to log CL commands. 
CALL QCMDEXC('CHGJOB JOB(415103/BIMBRA/QPADEV0004) LOGCLPGM(*YES)', 51);
Note: You will need to replace the job number, user, and job name. 
Also, note the length of the CHGJOB cmd happens to be 51 chars in this sample.
You will need to account for the length that you want to run.
You can highlight the command and double click, if that feature is on, to run the statement. The other option is to select Run->Selected.
A screen shot of what a RUN SQL Scripts looks like as follows:

image-20241114171333-2

Note: To run a CL command in Run SQL Scripts, you would type a CL: before the actual CL command. For example,
CL:CHGJOB JOB(451690/JENH/QPADEV000W) LOGCLPGM(*NO);

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p0000006x8GAAQ","label":"CL"},{"code":"a8m0z0000001goLAAQ","label":"IBM i Db2-\u003EACS \/ Navigator \/ Run SQL Scripts \/ ODBC"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3.0;and future releases"}]

Historical Number

526890417

Document Information

More support for:
IBM i

Component:
CL, IBM i Db2->ACS / Navigator / Run SQL Scripts / ODBC

Software version:
7.3.0 and future releases

Operating system(s):
IBM i

Document number:
634505

Modified date:
14 November 2024

UID

nas8N1012893

Manage My Notification Subscriptions