How to create an ADSO application that allows a select number of fields to retain entered data in mixed case while other fields are translated to upper case?
search cancel

How to create an ADSO application that allows a select number of fields to retain entered data in mixed case while other fields are translated to upper case?

book

Article ID: 52866

calendar_today

Updated On:

Products

IDMS IDMS - Database IDMS - ADS

Issue/Introduction

This can be accomplished by linking to RHDCUF00 on entry to the application to enable UPLOW and on exit to enable UPPER.

 

 

Environment

IDMS - all supported releases

Resolution

The entry point in an ADS application is usually an ADS dialog and the entry into any dialog is the premap process. In the premap process code the following link to RHDCUF00:

MOVE 'SET UPLOW' TO DCUF-CMD.
MOVE 30 TO DCUF-CMD-LN.
MOVE 50 TO DCUF-CMD-LNO.
LINK TO PROG 'RHDCUF00' USING (DCUF-INREC DCUF-OUTREC).

On the map that is associated with the dialog define all the fields that should be upper case with TRANSLATE TO UPPER CASE selected.
The fields that should be in mixed case should not be selected for TRANSLATE TO UPPER CASE.

In whatever dialog response process that exits the application code the following line to re-enable UPPER:

MOVE 'SET UPPER' TO DCUF-CMD. 
MOVE 30 TO DCUF-CMD-LN.
MOVE 50 TO DCUF-CMD-LNO.
LINK TO PROG 'RHDCUF00' USING (DCUF-INREC DCUF-OUTREC).

These are the record definition to be used with the dialogs:

ADD 
RECORD NAME IS DCUF-INREC VERSION IS 1
.
02 DCUF-CMD-LN
PICTURE IS 999
USAGE IS COMP
.
02 DCUF-CMD
PICTURE IS X(30)
USAGE IS DISPLAY

.
ADD
RECORD NAME IS DCUF-OUTREC VERSION IS 1
.
02 DCUF-CMD-LNO
PICTURE IS 99999
USAGE IS COMP
.
02 DCUF-RC
PICTURE IS 99
USAGE IS COMP
.

02 DCUF-CODE
PICTURE IS 99
USAGE IS COMP
.
02 DCUF-TOTAL-LN
PICTURE IS 99999
USAGE IS COMP
.
02 DCUF-TOTAL-LN-OUTPUT
PICTURE IS 99999
USAGE IS COMP
.
02 DCUF-TEXT
PICTURE IS X(250)
USAGE IS DISPLAY
.

ADD
RECORD NAME IS DCUF-INREC VERSION IS 1
.
02 DCUF-CMD-LN
PICTURE IS 999
USAGE IS COMP
.
02 DCUF-CMD
PICTURE IS X(30)
USAGE IS DISPLAY

.
ADD
RECORD NAME IS DCUF-OUTREC VERSION IS 1
.
02 DCUF-CMD-LNO
PICTURE IS 99999
USAGE IS COMP
.
02 DCUF-RC
PICTURE IS 99
USAGE IS COMP
.

02 DCUF-CODE
PICTURE IS 99
USAGE IS COMP
.
02 DCUF-TOTAL-LN
PICTURE IS 99999
USAGE IS COMP
.
02 DCUF-TOTAL-LN-OUTPUT
PICTURE IS 99999
USAGE IS COMP
.
02 DCUF-TEXT
PICTURE IS X(250)
USAGE IS DISPLAY
.

If by chance the entry point is a Cobol program the same code will work just by changing LINK TO PROG 'RHDCUF00' USING (DCUF-INREC DCUF-OUTREC) to TRANSFER CONTROL 'RHDCUF00' RETURN USING DCUF-INREC DCUF-OUTREC.