Calling RHDCMT00 from a dc-cobol program
search cancel

Calling RHDCMT00 from a dc-cobol program

book

Article ID: 23289

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

DCMT commands can be invoked from application programs. A program invokes a DCMT command by linking to the same program that IDMS invokes internally - RHDCMT00 - when the command is entered interactively from a terminal. This program can be used to invoke all DISPLAY and VARY DCMT commands.

The TechDocs page, Invoking DCMT and DCUF Commands from Programs, contains an example of an assembler program invoking RHDCMT00. However, there is no example showing how to do this from a cobol program.

Environment

Release: All supported releases.

Resolution

The .zip file attached to this article contains the program source in dcobmt00.txt and sample DCMT and SYSGEN syntax to define the program and task dynamically and/or permanently to sysgen.

Compile and define the program and task.

Example of program execution ... data entered at the terminal is displayed in red; messages written out by the program are displayed in green.

V1  ENTER NEXT TASK CODE:      CA IDMS release 19.0 tape GJJ02I node SYSTEM01
TCOBMT00
** Enter DCMT command to be processed **
display segment appldict
****   Return code from RHDCMT00=                 0000
V1  ENTER NEXT TASK CODE:      CA IDMS release 19.0 tape GJJ02I node SYSTEM01

The IDMS dc-log (OLP) contains following SNAP information (PARMOUT storage block):

09:15  3D3A6260  00000800 00000000 0000018A 0000018A  *................*
09:15  3D3A6270  4F606060 60606060 60606040 C1998581  *|---------- Area*
09:15  3D3A6280  40606060 60606060 60606060 404040D3  * -----------   L*
09:15  3D3A6290  96839240 404040D3 9660D781 87854040  *ock    Lo-Page  *
09:15  3D3A62A0  4040C889 60D78187 85407BD9 85A34040  *  Hi-Page #Ret  *
09:15  3D3A62B0  7BE49784 407BE399 85A3407B D5A386A8  *#Upd #Tret #Ntfy*
09:15  3D3A62C0  4FC1D7D7 D3C4C9C3 E34BC4C4 D3C4D4D3  *|APPLDICT.DDLDML*
09:15  3D3A62D0  40404040 40404040 40404040 40404040  *                *
09:15  3D3A62E0  E4978440 40404040 40F6F0F0 F0F14040  *Upd      60001  *
09:15  3D3A62F0  40404040 F6F2F0F0 F0404040 40F04040  *    62000    0  *
09:15  3D3A6300  404040F0 40404040 40F04040 404040F0  *   0     0     0*
09:15  3D3A6310  4A40E2A3 8194977A 40F2F0F0 F360F1F2  *? Stamp: 2003-12*
09:15  3D3A6320  60F1F160 F0F84BF0 F84BF3F9 4BF4F4F5  *-11-08.08.39.445*
09:15  3D3A6330  F5F9F340 40D78740 8799977A 40F04040  *593  Pg grp: 0  *
09:15  3D3A6340  40404040 D596E288 81998540 40D596C9  *    NoShare  NoI*
09:15  3D3A6350  C3E5C940 40D596D7 85999401 404FC1D7  *CVI  NoPerm. |AP*
09:15  3D3A6360  D7D3C4C9 C3E34BC4 C4D3C4C3 D3D6C440  *PLDICT.DDLDCLOD *
09:15  3D3A6370  40404040 40404040 40404040 40E49784  *             Upd*
09:15  3D3A6380  40404040 4040F7F0 F0F0F140 40404040  *      70001     *
09:15  3D3A6390  40F7F0F5 F0F04040 4040F040 40404040  * 70500    0     *
09:15  3D3A63A0  F2404040 4040F040 40404040 F04A40E2  *2     0     0? S*
09:15  3D3A63B0  A3819497 7A40F2F0 F0F360F1 F260F1F1  *tamp: 2003-12-11*
09:15  3D3A63C0  60F0F84B F0F84BF3 F94BF4F5 F7F5F7F0  *-08.08.39.457570*
09:15  3D3A63D0  4040D787 40879997 7A40F040 40404040  *  Pg grp: 0     *
09:15  3D3A63E0  40D596E2 88819985 4040D596 C9C3E5C9  * NoShare  NoICVI*
09:15  3D3A63F0  4040D596 D7859994 01400000 00000000  *  NoPerm. ......*
09:15  3D3A6400  00000000 00000000 00000000 00000000  *................*
09:15  3D3A6410->3D3A6A6F Same as prior line
09:15  END OF SNAP

Description of snapped information:

OUTAREALEN : 00000800
OUTRETCD   :     0000
OUTINDIC   :     0000
OUTLENREQ  : 0000018A
OUTLENUSED : 0000018A
OUTDATA    : starts with "4F606060......" (at address 3D3A6270)

Remark: Each line starts with a 1-byte length indicator (marked in blue)

To compare, this is the output from the same DCMT command executed from the ENTER NEXT TASK CODE: prompt:

DCMT DISPLAY SEGMENT APPLDICT
---------- Area -----------   Lock    Lo-Page    Hi-Page #Ret  #Upd #Tret #Ntfy
APPLDICT.DDLDML                Upd      60001      62000    0     0     0     0
 Stamp: 2003-12-11-08.08.39.445593  Pg grp: 0      NoShare  NoICVI  NoPerm

APPLDICT.DDLDCLOD              Upd      70001      70500    0     2     0     0
 Stamp: 2003-12-11-08.08.39.457570  Pg grp: 0      NoShare  NoICVI  NoPerm

Attachments

kd023289.zip get_app