Executing SQL queries in local mode
search cancel

Executing SQL queries in local mode

book

Article ID: 35302

calendar_today

Updated On:

Products

IDMS

Issue/Introduction

Is it possible to execute SQL queries in local mode?

Environment

Release: All supported releases.
Component: SQL Option.

Resolution

Yes. Like any other batch program or utility, SQL queries can be executed in local mode. Ensure the correct DMCL is specified in SYSIDMS, and that there is a CONNECT TO <dbname> where <dbname> contains the catalog where the SCHEMA is located.

Sample JCL: 

//IDMSBCF EXEC PGM=IDMSBCF,REGION=0M
//STEPLIB  DD DSN=IDMS.CV01.DBA.LOADLIB,DISP=SHR 
//         DD DSN=IDMS.CUSTOM.LOADLIB,DISP=SHR
//         DD DSN=IDMS.CAGJLOAD,DISP=SHR 
//SYSLST   DD SYSOUT=* 
//SYSPCH   DD SYSOUT=* 
//SYSCTL   DD DSN=IDMS.CV01.SYSCTL,DISP=SHR 
//SYSIDMS  DD * 
ECHO=ON 
LOCAL=ON
DMCL=DMCL1900 
//SYSIPT   DD * 
CONNECT TO APPLDICT; 
SELECT NAME, LENGTH, DATALENGTH, PREFIXLENGTH FROM SYSTEM.TABLE;