Can an ADSO dialog determine which IDMS CV it is executing on?
search cancel

Can an ADSO dialog determine which IDMS CV it is executing on?

book

Article ID: 57000

calendar_today

Updated On:

Products

IDMS IDMS - Database IDMS - ADS

Issue/Introduction

Is there a way to determine programmatically in an ADSO dialog what CV it is executing on? In other words, is there some system variable that could be interrogated from an executing dialog to determine the CV that it is executing on? 

Environment

IDMS - All Supported Releases

Resolution

The ACCEPT command could be used to retrieve the SYSTEM VERSION into a binary halfword field.

Example:

PROCESS NAME IS ACCEPT VERSION IS 1
PUBLIC ACCESS IS ALLOWED FOR ALL
PROCESS SOURCE FOLLOWS
ACCEPT SYSVERSION INTO SYS-NUM.
RETURN.
MSEND

 

This returns:

02 SYS-NUM...................................N 00001850

 

This is on a CV with this definition:

 


*+ ADD SYSTEM 1850
*+ SYSTEM ID IS SYST1850
*+ CVNUMBER IS 17

 

It does not directly give the CV number but the SYSTEM number. The two numbers are associated on the SYSTEM statement but either way it identifies the CV it is running on