This chapter describes the application development enhancements.
This section contains the following topics:
Accept Extended Database Statistics DML Command
Assembler Programming Enhancements
Built-In Functions for Date-Time Stamp Conversions
COBOL Compiler Debugging Line Support
FIND/OBTAIN WITHIN SET USING SORT KEY DML Statement
IDMSIN01 Environment Information Function
The ACCEPT database statistics command is enhanced with a new parameter that lets you acquire the extended VIB statistics provided as part of the CA IDMS runtime system. You can code this new parameter in a COBOL or PL/I program or in a CA ADS dialog.
If you manually coded the expansion of the ACCEPT database statistics verb in a program and hard coded the extra parameter on the command to acquire the extended numbers, you can remove this code and replace it with the appropriate new DML command. In addition, you can replace the hard coded record structure with a copy of the CA IDMS-provided record from the data dictionary. Implementing either one of these options requires that you precompile the program, and compile and link the appropriate load modules.
COBOL Syntax
►►─── ACCEPT db-statistics FROM IDMS-STATISTICS ──────────────────────────────► ►───┬─────────────────────────────┬─ . ──────────────────────────────────────►◄ └─ EXTENDED db-stat-extended ─┘
PL/l Syntax
►►─── ACCEPT IDMS_STATISTICS INTO (db-statistics-field) ──────────────────────► ►───┬───────────────────────────────┬─ ; ────────────────────────────────────►◄ └─ EXTENDED (db-stat-extended) ─┘
CA ADS Syntax
►►─── ACCept ─┬─ STATISTICS ─┬─ into db-statistics-variable ──────────────────► └─ STATS ──────┘ ►─── FROM IDMS-STATISTICS ─┬─────────────────────────────┬ . ────────────────►◄ └─ EXTENDED db-stat-extended ─┘
Parameter
Specifies the name of a fullword-aligned 100-byte field in program variable storage.
The data copied from IDMS-STATISTICS to db-stat-extended is formatted as follows for COBOL and CA ADS:
01 DB-STAT-EXTENDED 03 SR8-SPLITS PIC S9(8) COMP. 03 SR8-SPAWNS PIC S9(8) COMP. 03 SR8-STORES PIC S9(8) COMP. 03 SR8-ERASES PIC S9(8) COMP. 03 SR7-STORES PIC S9(8) COMP. 03 SR7-ERASES PIC S9(8) COMP. 03 BINARY-SEARCHES-TOTAL PIC S9(8) COMP. 03 LEVELS-SEARCHED-TOTAL PIC S9(8) COMP. 03 ORPHANS-ADOPTED PIC S9(8) COMP. 03 LEVELS-SEARCHED-BEST PIC S9(4) COMP. 03 LEVELS-SEARCHED-WORST PIC S9(4) COMP. 03 FILLER PIC X(60).
For COBOL, you can copy this record layout from the data dictionary by coding the following statement in program variable storage:
COPY IDMS DB-STAT-EXTENDED.
For CA ADS, the record DB-STAT-EXTENDED is defined in the dictionary when CA IDMS is installed and can be included as a dialog work record.
The data copied from IDMS_STATISTICS to db-stat-extended is formatted as follows for PL/l:
DECLARE
01 DB_STAT_EXTENDED,
03 SR8_SPLITS FIXED BINARY(31),
03 SR8_SPAWNS FIXED BINARY(31),
03 SR8_STORES FIXED BINARY(31),
03 SR8_ERASES FIXED BINARY(31),
03 SR7_STORES FIXED BINARY(31),
03 SR7_ERASES FIXED BINARY(31),
03 BINARY_SEARCHES_TOTAL FIXED BINARY(31),
03 LEVELS_SEARCHED_TOTAL FIXED BINARY(31),
03 ORPHANS_ADOPTED FIXED BINARY(31),
03 LEVELS_SEARCHED_BEST FIXED BINARY(15),
03 LEVELS_SEARCHED_WORST FIXED BINARY(15),
03 FILLER___1 CHARACTER(60);
You can copy this record layout from the data dictionary by coding the following statement in program variable storage:
INCLUDE IDMS (DB_STAT_EXTENDED).
Extended Statistics Fields
|
Field |
Description |
|---|---|
|
SR8 splits |
The number of SR8 records that were split during the life of the run-unit. |
|
SR8 spawns |
The number of times that a new level of an index was created due to the splitting of the index's top level SR8. |
|
SR8 stores |
The number of SR8 records of all levels that were stored into the database. |
|
SR8 erases |
The number of SR8 records of all levels that were erased from the database. |
|
SR7 stores |
The number of SR7 records stored into the database. |
|
SR7 erases |
The number of SR7 records erased from the database. |
|
Total binary searches |
The total number of times the DBMS initiated a binary search against an index. |
|
Total levels searched |
Incremented every time that the DBMS goes down a level during a binary search throughout the life of the entire run-unit across all accessed indexes. |
|
Orphans adopted |
The number of orphaned user records that were adopted back to their referencing level-0 SR8. |
|
Fewest levels searched (best) |
The fewest number of levels walked during a binary search throughout the life of the run-unit. |
|
Most levels searched (worst) |
The greatest number of levels walked during a binary search throughout the life of the run-unit. |
More Information
The ACCEPT command is enhanced to include a new SYSTEM ID parameter that lets you retrieve the system ID of the current DC/UCF system. You can code the SYSTEM ID parameter in a COBOL or PL/I program or in a CA ADS dialog.
COBOL Syntax
►►─── ACCEPT ─┬─ SYSTEM ID ──┬─ INTO return-location . ──────────────────────►◄ └─ . . . ──────┘
PL/I Syntax
►►─── ACCEPT ─┬─ SYSTEM ID ──┬─ INTO return-location ; ──────────────────────►◄ └─ . . . ──────┘
CA ADS Syntax
►►─── ACCEPT ─┬─ SYSTEM ID ──┬─ INTO location . ─────────────────────────────►◄ └─ . . . ──────┘
Parameter
Specifies the 8 character name (nodename) by which the DC/UCF system is known to other nodes in the DC/UCF communications network.
More Information
ADSORPTS enhancements include the following:
ADSORPTS is enhanced to report on SQL tables as it reports on records. When a RECORD report is requested, ADSORPTS now provides column names and descriptions for SQL tables in the same format that it provides field names and descriptions for records.
ADSORPTS is enhanced to report on an unlimited number of dialogs and eliminate the message: Dialog Name Table too small. This message was displayed in the previous release when the total number of dialog names, masks, and ranges that were requested in a single ADSORPTS job step exceeded a limit of 200.
You no longer need to break migrations into multiple steps of less than 200 requests each.
For more information about ADSORPTS, see the CA ADS Reference Guide.
This section describes the enhancements that are usable in Assembler programs.
The #CHAP DML statement is enhanced to change the dispatching priority of the issuing task relative to its current priority.
Syntax
►►─┬─────────┬─ #CHAP PRI=priority ─┬────────────────────────┬─────────────►◄ └─ label ─┘ └─ ACTION= ─┬─ SET ◄─────┤ ├─ ADD ──────┤ └─ SUBTRACT ─┘
Parameters
Specifies a new dispatching priority for the issuing task.
A register that contains the priority in the low-order byte, the symbolic name of a user-defined field that contains the priority, or an absolute expression in the range 0 through 240.
Specifies the meaning of the priority value using one of the following options:
The priority is an absolute value. SET is the default.
The priority is a relative value and is added to the task's current priority.
The priority is a relative value and is subtracted from the task's current priority.
Example
The following example lowers the dispatching priority to one less than the current dispatching priority:
#CHAP PRI=1,ACTION=SUBTRACT
Status Codes
The change-priority request is unconditional; any return code other than X'00' results in an abend of the task.
More Information
For more information about the #CHAP DML statement, see the CA IDMS DML Reference Guide for Assembler.
The #GETSTG DML statement is enhanced to include a new parameter that requests the system to allocate storage above the 16-megabyte line.
Syntax
►── #GETSTG TYPE= ─ . . . ───────────────────────────────────────────────────► ►─┬─────────────────────┬────────────────────────────────────────────────────► └─ ,LOC= ─┬─ ANY ◄ ──┬┘ ├─ BELOW ──┤ └─ XA ─────┘
Parameters
Indicates where the system allocates storage.
(Default); indicates that storage can be allocated anywhere in the region.
Requests that the system allocate storage below the 16-megabyte line.
Requests that the system allocate storage above the 16-megabyte line. This option is ignored if the system has no XA storage pools defined or if it is not XA-enabled.
More Information
For more information about the #GETSTG DML statement, see the CA IDMS DML Reference Guide for Assembler.
CA IDMS is enhanced to enable CA ADS dialogs and CA OLQ procedures to call the date-time functions of IDMSIN01 through new date-time stamp built-in functions.
This section describes the new date-time stamp built-in functions that you can code into existing or new CA ADS dialogs.
Date-time stamp built-in functions convert external date-time stamps to internal date-time stamps. Conversely, internal date-time stamps can be converted to external date-time stamps. The date-time stamp built-in functions call the date-time functions of IDMSIN01.
Note: For more information about IDMSIN01, see the CA IDMS Callable Services Guide.
In the following table, 8-byte binary fields are defined as PIC 9(16) COMPUTATIONAL fields, while display fields are defined with PIC X definitions.
Note: For more information about the date-time stamp formats used by the date-time stamp functions, see the chapter "Representation of Date/Time Values" in the CA IDMS SQL Reference Guide.
|
Function |
Keyword |
What it does |
|---|---|---|
|
External Date |
DATEEXT |
Returns a 10-byte external date stamp as an 8-byte internal binary date stamp |
|
Internal Date |
DATEINT |
Returns an 8-byte internal binary date stamp as a displayable 10-byte date stamp |
|
Display Date Time |
DISPDT |
Returns the current date-time stamp as a 26-byte displayable date-time stamp |
|
External Date-Time |
DATETIMX |
Returns a 26-byte external date-time stamp as an 8-byte internal binary date-time stamp |
|
Internal Date-Time |
DTINT |
Returns an 8-byte internal date-time stamp as a 26-byte displayable date-time stamp |
|
External Time |
TIMEEXT |
Returns an 8-byte displayable time stamp as an 8-byte binary time stamp |
|
Internal Time |
TIMEINT |
Returns an 8-byte internal time stamp as a displayable 8-byte time stamp |
Purpose
Returns the current date-time stamp as a 26-byte displayable date-time stamp. The returned value is in the format CCYY-MM-DD-HH.MM.SS.NNNNNN.
Syntax
◄◄────┬─ DISPLAY-DATE-TIME ──┬────────── () ──────────────────────────────────►◄ ├─ DISPDT ─────────────┤ └─ DDAT ───────────────┘
Example
In the following example, the DISPDT function is used to move the current date-time stamp to the field DATE-TIME-FIELD. The DISPDT function is executed on August 1, 2007 at approximately 3:37 p.m.
Statement:
MOVE DISPDT() TO DATE-TIME-FIELD
Returned string:
'2007-08-01-15.37.11.876526'
Purpose
Returns a 10-byte external date stamp as an 8-byte internal binary date stamp.
Syntax
◄◄────┬─ DATE-EXTERNAL ──┬────────── (date-stamp) ────────────────────────────►◄ ├─ DATEEXT ────────┤ └─ DEXT ───────────┘
Parameter
Specifies the 10-byte representation of the date-stamp in the format CCYY-MM-DD.
date-stamp can be one of the following:
Example
In the following example, the DATEEXT function is used to convert a 10-byte string date, with the format CCYY-MM-DD, to an 8-byte binary value:
Initial value:
DATE-FIELD: '2007-08-01'
Statement:
MOVE DATEEXT (DATE-FIELD) TO DATE-BINARY
Returned value:
x0165DB0000000000
Purpose
Returns an 8-byte internal binary-date stamp as a displayable 10-byte date stamp. The returned value is in the format CCYY-MM-DD.
Syntax
◄◄────┬─ DATE-INTERNAL ──┬────────── (binary-date) ───────────────────────────►◄ ├─ DATEINT ────────┤ └─ DINT ───────────┘
Parameter
Specifies the user-defined variable that contains an 8-byte internal binary-date stamp.
binary-date must be the name of a user-defined variable that contains an 8-byte internal binary date stamp.
Example
In the following example, the DATEINT function converts an 8-byte internal date stamp to a 10-byte displayable value. The returned value is in the format CCYY-MM-DD.
Initial value:
DATE-STAMP-BINARY: x0165DB0000000000
Statement:
MOVE DATEINT(DATE-STAMP-BINARY) TO DATE-FIELD
Returned string:
'2007-08-01'
Purpose
Returns a 26-byte external date-time stamp as an 8-byte date-time internal binary stamp.
Syntax
◄◄────┬─ DATE-TIME-EXTERNAL ──┬────────── (date-time-stamp) ──────────────────►◄ ├─ DATETIMX ────────────┤ └─ DTEX ────────────────┘
Parameter
Specifies the 26-byte date-time-stamp to convert to an 8-byte binary date-time-stamp.
date-time-stamp can be one of the following:
Example
In the following example, the DATETIMX function converts a 26-byte string date-time, with the format CCYY-MM-DD-HH.MM.SS.NNNNNN, to an 8-byte binary value:
Initial value:
DT-FIELD: '2007-08-01-15.37.11.876526'
Statement:
MOVE DATETIMX(DT-FIELD) TO DATE-TIME-BINARY
Returned value:
x0165DB0DBA7D5FEE
Purpose
Returns an 8-byte internal binary date-time stamp as a 26-byte displayable date-time stamp.
Syntax
◄◄──┬─ DATE-TIME-INTERNAL ──┬─────── (binary-date-time-stamp) ────────────────►◄ ├─ DTINT ───────────────┤ └─ DTIN ────────────────┘
Parameter
Specifies the user-defined variable that contains an 8-byte internal binary date-time stamp.
binary-date-time stamp must be the name of a user-defined variable that contains an 8-byte internal binary date-time stamp.
Example
In the following example, the DTINT function converts an 8-byte internal date-time stamp to a 26-byte displayable date-time stamp. The returned value is in the format CCYY-MM-DD-HH.MM.SS.NNNNNN.
Initial value:
DATE-TIME-STAMP-BINARY: x0165DB0DBA7D5FEE
Statement:
MOVE DTINT(DATE-TIME-STAMP-BINARY) TO DT-FIELD
Returned string:
'2007-08-01-15.37.11.876526'
Purpose
Returns an 8-byte displayable time as an 8-byte internal binary time stamp.
Syntax
◄◄────┬─ TIME-EXTERNAL ──┬────────── (time-stamp) ────────────────────────────►◄ ├─ TIMEEXT ────────┤ └─ TIMX ───────────┘
Parameter
Specifies the 8-byte displayable time stamp to be converted into an 8-byte binary internal time stamp.
time-stamp can be one of the following:
Example
In the following example, the TIMEEXT function is used to convert an 8-byte displayable time stamp to an 8-byte binary internal time stamp in the format HH.MM.SS:
Initial value:
TIME-FIELD: '17.08.09'
Statement:
MOVE TIMEEXT(TIME-FIELD) TO TIME-BINARY
Returned value:
x0000000F0F900000
Purpose
Returns an 8-byte internal binary time stamp as a displayable 8-byte time stamp.
Syntax
◄◄────┬─ TIME-INTERNAL ──┬────────── (binary-time-stamp) ─────────────────────►◄ ├─ TIMEINT ────────┤ └─ TINT ───────────┘
Parameters
Specifies the 8-byte internal binary time stamp.
binary-time-stamp must be the name of a user-defined variable that contains an 8-byte internal binary time stamp.
Example
In the following example, the TIMEINT function converts an 8-byte internal binary time stamp to an 8-byte displayable time stamp in the format HH.MM.SS:
Initial value:
TIME-BINARY: x0000000F0F900000
Statement:
MOVE TIMEINT (TIME-BINARY) TO TIME-FIELD
Returned string:
'17.08.09'
For more information about built-in functions, see the CA ADS Reference Guide.
This section describes the new date-time stamp built-in functions that you can code into existing or new CA OLQ procedures. Date-time stamp built-in functions convert external date-time stamps to internal date-time stamps. Conversely, internal date-time stamps can be converted to external date-time stamps.
You can invoke the built-in functions by specifying an invocation name. These functions call the date-time functions of IDMSIN01.
Note: For more information about IDMSIN01, see the CA IDMS Callable Services Guide.
Note: For more information about the date-time stamp formats used by the date-time stamp functions, see the chapter "Representation of Date/Time Values" in the CA IDMS SQL Reference Guide.
CA OLQ Date-Time Stamp Built-In Functions:
|
Function |
Invocation |
Example |
|---|---|---|
|
Return a 10-byte external date as an 8-byte internal binary date stamp |
DATE-EXTERNAL DATEEXT DEXT |
COMPUTE DATE-BINARY = DATEEXT(DATE-FIELD) |
|
Return an 8-byte internal binary date stamp as a displayable 10-byte date stamp |
DATE-INTERNAL DATEINT DINT |
COMPUTE DATE-FIELD = DATEINT(DATE-STAMP-BINARY) |
|
Return a 26-byte external date-time stamp as an 8-byte internal binary date-time stamp |
DATE-TIME-EXTERNAL DATETIMX DTEX |
COMPUTE DATE-TIME-BINARY = DATETIMX(DT-FIELD) |
|
Return an 8-byte internal binary date-time stamp as a 26-byte displayable date-time stamp |
DATE-TIME-INTERNAL DTINT DTIN |
COMPUTE DT-FIELD = DTINT(DATE-TIME-STAMP) |
|
Return an 8-byte displayable time as an 8-byte internal binary time stamp |
TIME-EXTERNAL TIMEEXT TIMX |
COMPUTE TIME-BINARY = TIMEEXT(TIME-FIELD) |
|
Return an 8-byte internal binary time stamp as a displayable 8-byte time stamp |
TIME-INTERNAL TIMEINT TINT |
COMPUTE TIME-FIELD = TIMEINT(TIME-BINARY) |
Purpose
The date external function returns a 10-byte external date as an 8-byte internal binary date stamp.
Syntax
◄◄────┬─ DATE-EXTERNAL ─┬─ (date-stamp) ──────────────────────────────────────►◄ ├─ DATEEXT ───────┤ └─ DEXT ──────────┘
Invocation names:
DATE-EXTERNAL DATEEXT DEXT
Parameter
Represents the 10-byte date stamp in the format CCYY-MM-DD.
date-stamp can be one of the following:
Example
This example uses the DATEEXT function to convert a 10-byte string date, with the format CCYY-MM-DD, to an 8-byte binary value.
Initial value:
DATE-FIELD: '2007-08-01'
Statement:
COMPUTE DATE-BINARY = DATEEXT(DATE-FIELD).
Returned value:
x0165DB0000000000
Purpose
The date internal function returns an 8-byte internal binary date stamp as a displayable 10-byte date stamp. The returned value is in the format CCYY-MM-DD.
Syntax
◄◄──┬─ DATE-INTERNAL ──┬─────── (binary-date) ───────────────────────────────►◄ ├─ DATEINT ────────┤ └─ DINT ───────────┘
Invocation names:
DATE-INTERNAL DATEINT DINT
Parameter
Specifies the name of a user-defined variable that contains an 8-byte internal binary date.
Example
This example uses the DATEINT function to convert an 8-byte internal date stamp to a 10-byte displayable value. The returned value is in the format CCYY-MM-DD.
Initial value:
DATE-STAMP-BINARY: x0165DB0000000000
Statement:
COMPUTE DATE-FIELD = DATEINT(DATE-STAMP-BINARY).
Returned string:
'2007-08-01'
Purpose
The date-time external function returns a 26-byte external date-time stamp as an 8-byte date-time internal binary stamp.
Syntax
◄◄────┬─ DATE-TIME-EXTERNAL ─┬─ (date-time-stamp) ────────────────────────────►◄ ├─ DATETIMX ───────────┤ └─ DTEX ───────────────┘
Invocation names:
DATE-TIME EXTERNAL DATETIMX DTEX
Parameter
Specifies the 26-byte date-time stamp to convert to an 8-byte binary date-time stamp.
date-time-stamp can be one of the following:
Example
This example uses the DATETIMX function to convert a 26-byte string date, with the format CCYY-MM-DD-HH.MM.SS.NNNNNN, to an 8-byte binary value.
Initial value:
DT-FIELD: '2007-08-01-15.37.11.876526'
Statement:
COMPUTE DATE-TIME-BINARY = DATETIMX(DT-FIELD)
Returned value:
x0165DB0DBA7D5FEE
Purpose
The date internal function returns an 8-byte internal binary date-time stamp as a 26-byte displayable date-time stamp.
Syntax
◄◄──┬─ DATE-TIME-INTERNAL ──┬─ (binary-date-time-stamp) ─────────────────────►◄ ├─ DTINT ───────────────┤ └─ DTIN ────────────────┘
Invocation names:
DATE-TIME-INTERNAL DTINT DTIN
Parameter
Specifies the name of a user-defined variable that contains an 8-byte internal binary date-time stamp.
Example
This example uses the DTINT function to convert an 8-byte internal date-time stamp to a 26-byte displayable date-time stamp. The returned value is in the format CCYY-MM-DD-HH.MM.SS.NNNNNN.
Initial value:
DATE-TIME-STAMP-BINARY: x0165DB0DBA7D5FEE
Statement:
COMPUTE DT-FIELD = DTINT(DATE-TIME-STAMP-BINARY)
Returned string:
'2007-08-01-15.37.11.'
Purpose
The time external function returns an 8-byte displayable time as an 8-byte internal binary time stamp.
Syntax
◄◄────┬─ TIME-EXTERNAL ─┬─ (time-stamp) ──────────────────────────────────────►◄ ├─ TIMEEXT ───────┤ └─ TIMX ──────────┘
Invocation names:
TIME-EXTERNAL TIMEEXT TIMX
Parameter
Specifies the 8-byte displayable time stamp to be converted into an 8-byte binary internal time stamp.
time-stamp can be one of the following:
Example
This example uses the TIMEEXT function to convert an 8-byte displayable time stamp to an 8-byte binary internal time stamp in the format HH.MM.SS.
Initial value:
TIME-FIELD: '17.08.09'
Statement:
COMPUTE TIME-BINARY = TIMEEXT(TIME-FIELD)
Returned Value:
x0000000F0F900000
Purpose
The time internal function returns an 8-byte internal binary time stamp as a displayable 8-byte time stamp.
Syntax
◄◄────┬─ TIME-INTERNAL ─┬─ (binary-time-stamp) ───────────────────────────────►◄ ├─ TIMEINT ───────┤ └─ TINT ──────────┘
Invocation names:
TIME-INTERNAL TIMEINT TINT
Parameters
Specifies the 8-byte internal binary time stamp.
binary-time-stamp must be the name of a user-defined variable that contains an 8-byte internal binary time stamp.
Example
This example uses the TIMEINT function to convert an 8-byte internal binary time stamp to an 8-byte displayable time stamp in the format HH.MM.SS.
Initial value:
TIME-BINARY: x0000000F0F900000
Statement:
COMPUTE TIME-FIELD = TIMEINT(TIME-BINARY)
Returned string:
'17.08.09'
For more information about built-in functions, see the CA OLQ Reference Guide.
Debugging line support is provided in COBOL programs so that DML commands can be designated as debugging lines.
A debugging line is a statement that is compiled only when the compile-time switch is activated through COBOL syntax. If the debugging switch is activated, the COBOL compiler compiles the debugging lines into the object. If not activated, the debugging lines are treated as comments.
If the debugging line is also a CA IDMS DML statement, the COBOL precompiler propagates the "D" in column 7 on all generated lines, so that it is passed to the COBOL compiler and processed properly. If a DML statement is continued over multiple lines, you should only specify the "D" in column 7 of the first line of the DML statement.
A COBOL program containing the FIND/OBTAIN WITHIN SET USING SORT KEY DML statement might compile with a syntax error although it compiled successfully on a prior release. CA IDMS now ensures compliance with the following rules when processing a FIND/OBTAIN WITHIN SET USING SORT KEY DML statement:
The IDMSDMLC precompiler is enhanced to detect extra parameters and issue a syntax error at precompile time.
Note: For more information about the FIND/OBTAIN WITHIN SET USING SORT KEY DML statement, see the CA IDMS DML Reference Guide for COBOL.
An application program can call IDMSIN01 with a new function to receive a block of runtime information, such as the mode the CA IDMS application is running under.
When calling IDMSIN01 from a COBOL program, the first two parameters passed are always the address of an RPB block and the address of the function REQUEST-CODE and RETURN-CODE fields. The rest of the parameters depend on what service is being called.
COBOL programs can use standard calling conventions. The following is an example of calling IDMSIN01 to retrieve a block of runtime information:
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
**************************************************************
* The following is the 1st parameter on all IDMSIN01 calls
**************************************************************
01 RPB.
02 FILLER PIC X(36).
**************************************************************
* The following is the 2nd parameter on all IDMSIN01 calls
**************************************************************
01 REQ-WK.
02 REQUEST-CODE PIC S9(8) COMP.
88 IN01-FN-TRACE VALUE 00.
88 IN01-FN-NOTRACE VALUE 01.
88 IN01-FN-GETPROF VALUE 02.
88 IN01-FN-SETPROF VALUE 03.
88 IN01-FN-GETMSG VALUE 04.
88 IN01-FN-GETDATE VALUE 05.
88 IN01-FN-GETUSER VALUE 08.
88 IN01-FN-SYSCTL VALUE 10.
88 IN01-FN-TRINFO VALUE 16.
88 IN01-FN-TXNSON VALUE 28.
88 IN01-FN-TXNSOFF VALUE 29.
88 IN01-FN-RRSCTX VALUE 30.
88 IN01-FN-STRCONV VALUE 34.
88 IN01-FN-ENVINFO VALUE 36.
02 REQUEST-RETURN PIC S9(8) COMP.
**************************************************************
* The following work fields are used by a variety of
* IDMSIN01 calls
**************************************************************
01 WORK-FIELDS.
02 WK-DTS-FORMAT PIC S9(8) COMP VALUE 0.
02 LINE-CNT PIC S9(4) COMP.
02 WK-DTS PIC X(8).
02 WK-CDTS PIC X(26).
02 WK-KEYWD PIC X(8).
02 WK-VALUE PIC X(32).
02 WK-DBNAME PIC X(8).
02 WK-USERID PIC X(32).
02 WK-SYSCTL PIC X(8).
02 WK-TIME-INTERNAL PIC X(8).
02 WK-TIME-EXTERNAL PIC X(8).
02 WK-DATE-INTERNAL PIC X(8).
02 WK-DATE-EXTERNAL PIC X(10).
02 WK-RRS-FAKE-FUNCTION PIC S9(4) COMP.
88 IN01-FN-RRSCTX-GET VALUE 01.
88 IN01-FN-RRSCTX-SET VALUE 02.
02 WK-RRS-FUNCTION-REDEF REDEFINES WK-RRS-FAKE-FUNCTION.
03 WK-RRS-FAKE-FILLER PIC X.
03 WK-RRS-FUNCTION PIC X.
02 WK-RRS-CONTEXT PIC X(16).
02 WK-STRING-FUNCTION PIC X(4).
88 CONVERT-EBCDIC-TO-ASCII VALUE 'ETOA'.
88 CONVERT-ASCII-TO-EBCDIC VALUE 'ATOE'.
02 WK-STRING PIC X(17)
VALUE 'String to convert'.
02 WK-STRING-LENGTH PIC S9(8) COMP VALUE 17.
**************************************************************
* The following group item is only used by the call that
* returns runtime environment information.
**************************************************************
01 EVBLOCK.
02 EV$SIZE PIC S9(4) COMP VALUE +31.
02 EV$MODE PIC X.
02 EV$TAPE# PIC X(6).
02 EV$REL# PIC X(6).
02 EV$SPACK PIC X(2).
02 EV$DMCL PIC X(8).
02 EV$NODE PIC X(8).
*********************************************************
PROCEDURE DIVISION.
*********************************************************
*********************************************************
* Call IDMSIN01 to request that it return runtime environment
* information.
*
* Parm 1 is the address of the RPB.
* Parm 2 is the address of the REQUEST-CODE and RETURN-CODE.
* Parm 3 is the address of the ENVINFO return area.
*********************************************************
SET IN01-FN-ENVINFO TO TRUE.
CALL 'IDMSIN01' USING RPB REQ-WK EVBLOCK.
DISPLAY 'Runtime mode is ' EV$MODE.
DISPLAY 'CA/IDMS tape volser is ' EV$TAPE#.
DISPLAY 'CA/IDMS release number is ' EV$REL#.
DISPLAY 'CA/IDMS service pack number is ' EV$SPACK.
DISPLAY 'DMCL name is ' EV$DMCL.
DISPLAY 'System node name is ' EV$NODE.
Note: For more information about IDMSIN01, see the CA IDMS Callable Services Guide.
|
Copyright © 2009 CA.
All rights reserved.
|
|