Article 147332 of comp.os.vms:

In article <319574b7.20210854@news.cc.emory.edu>, jrevenn@emory.edu (Irwin Aschkenas) writes...
>On Fri, 10 May 1996 13:13:40 -0500 (CDT), "Tom Malin, Nashville Tech"
><MALIN_T@NSTI01.NSTI.TEC.TN.US> wrote:
> 
>>Can someone please tell me if it's possible (and how) to do the following,
>>utilizing DECforms v1.4.  I want to have a field for entering a password.  I am
>>aware of the "concealed" option but I want the password echoed to the screen
>>but with each character replaced with an "*".  TIA. 
> 
>Not echoing any characters is done for security purposes.  The only
>way I was able to do this was to write my own function that I called
>from DECforms which did a QIO to get the input and echo whatever character. 

Combining DECforms and QIOs is a kludge that should be avoided at all cost.

I search an internal Digital notes conference for subject=password
and came up with the included solution. (Untested, Original author unknown)


Form ARRAY_OF_CHARS

    Form Data 
        Group CHARS 
            Occurs 20
            Current CUROFFSET
            ONE_CHAR Character(1)
        End Group
        Group INFO_INPUT 
            Occurs 20
            ONE_CHAR Character(1)
        End Group
        CUROFFSET Word Integer
        ANOTHER_FIELD Character(1)
    End Data











































    Layout VT_LAYOUT
        Device
            Terminal DECVT100
                Type %VT100
            Terminal DECVT200
                Type %VT200
            Terminal DECVT300
                Type %VT300
        End Device
        Size 24 Lines by 80 Columns

        Viewport FORMS001_VIEW2
            Lines 1 Through 23
            Columns 1 Through 80
        End Viewport

        Function POS_LEFT
            Is %LEFT
               %F12
        End Function

        Function POS_RIGHT
            Is %RIGHT
               %CARRIAGE_RETURN
               %HORIZONTAL_TAB
        End Function

        Control Text Response "TEST"
            Activate
                Panel FORMS001_PAN2
        End Response













        Panel FORMS001_PAN2
            Viewport FORMS001_VIEW2
            Retain
            Group CHARS
                Horizontal
                    Displays 20
                Field ONE_CHAR
                    Same Line
                    Next Column +1
                    Exit Response
                        Let INFO_INPUT(CUROFFSET).ONE_CHAR = 
                            CHARS(CUROFFSET).ONE_CHAR
                        Let CHARS(CUROFFSET).ONE_CHAR = "*"
                    End Response

                    Function Response POS_LEFT
                        If GROUP FIRST ITEM Then
                            Message
                                %NO_LEFT_ITEM
                        Else
                            Position To Left Occurrence
                        End If
                    End Response

                    Function Response POS_RIGHT
                        If ( NOT GROUP LAST ITEM) Then
                            Position To Right Occurrence
                        Else
                            Message
                                %NO_RIGHT_ITEM
                        End If
                    End Response

                    Autoskip
                    Output Picture X
                End Field

            End Group

            Group INFO_INPUT
                Horizontal
                    Displays 20
                Field ONE_CHAR
                    Next Line +4
                    Same Column
                    Output Picture X
                    Protected
                End Field

            End Group

            Field ANOTHER_FIELD
                Line 1
                Column 29
                Output Picture X
            End Field

            Literal Text
                Line 1
                Column 1
                Value "["
            End Literal

            Literal Text
                Line 1
                Column 12
                Value "]"
            End Literal

            Literal Text
                Line 1
                Column 28
                Value "["
            End Literal

            Literal Text
                Line 1
                Column 30
                Value "]"
            End Literal

            Literal Text
                Line 6
                Column 15
                Value "["
            End Literal

            Literal Text
                Line 6
                Column 1
                Value "["
            End Literal

            Literal Text
                Line 6
                Column 22
                Value "]"
            End Literal

            Literal Text
                Line 5
                Column 2
                Value "data input:"
            End Literal

            Literal Text
                Line 1
                Column 22
                Value "]"
            End Literal

        End Panel

    End Layout
End Form


Hope this helps,		+--------------------------------------+
Hein van den Heuvel, Digital.	| All opinions expressed are mine, and |
  "Makers of VMS and other	| may not reflect those of my employer |
   fine Operating Systems."	+--------------------------------------+


