I need to PULL a password that a user will type, but don't want the characters to display on the screen. Could you help me to achieve this in REXX.
-
1Where is your REXX code running? ISPF? Windows? Linux? OS/2? Which dialect of REXX are you using? OOREXX? Regina? – cschneid Aug 06 '13 at 16:40
-
It will be running in ISPF, I am not using OOREXX or Regina. I am running this in z/OS. – Karthick Kathiresan Aug 06 '13 at 16:42
2 Answers
Since you are running in ISPF, you can define a panel to reside in the ISPPLIB concatenation with a password field that is non-display.

- 10,237
- 1
- 28
- 39
As @cshneid, use an ISPF Panel (and place it in the ISPPLIB). Here is an example panel containing a password field (see $ attribute) taken from ISPF Manual.
)ATTR
* TYPE(TEXT) INTENS(HIGH) COLOR(WHITE) CAPS(OFF)
# TYPE(TEXT) INTENS(HIGH) COLOR(BLUE) CAPS(OFF)
@ TYPE(TEXT) INTENS(LOW) COLOR(BLUE) HILITE(REVERSE)
? TYPE(TEXT) INTENS(LOW) COLOR(TURQ) CAPS(OFF)
_ TYPE(INPUT) INTENS(HIGH) COLOR(YELLOW)
$ TYPE(INPUT) INTENS(NON)
ø TYPE(OUTPUT) INTENS(LOW) COLOR(TURQ) CAPS(OFF)
)BODY
* --------------------------@EMPLOYEE RECORD*--------------------------
# SERIAL NO.*===>_SERNUM +&rbl %
#
#
# NAME:?&LAST, &FIRST
#
# ADDRESS:øADDR1 +
# øADDR2 +
# øADDR3 +
# øADDR4 +
#
# POSITION:øPOSIT +
#
# YEARS EXPERIENCE:øYRS+
#
# SALARY:øSALARY + # PASSWORD*===>$PSW +
# (Password is required for salary)
#
#
* Enter#END*command to terminate application.
#
)PROC
VER(&SERNUM,NB,NUM)
.ATTR(.CURSOR) = 'COLOR(RED) HILITE(BLINK)'
)END
Please note I do not have a mainframe available to check so the following so there may be some syntax errors:
Rexx command to display a panel:
Address ispexec display panel(panelName)
If you need to add a DSN to the ISPPLIB
"ispexec libdef ispplib dataset id(panel-dsn)"
Background information
ISPF uses a series of files (ispplib, ispmlib, isptlib etc) to store the details it uses. You can add extra PDS (on a temporary basis) to ISPF using the LIBDEF function in a rexx/clist programs. Historically these PDS's where RECFM=FB and had a LRECL of 80. This has changed. You should check the attributes of the existing ispplib PDS's and use similar attributes.
To display a panel it needs to be stored in the ISPPLIB (or a PDS allocated to ispplib using LIBDEF).
if you store the panel in pds my.panels(test) and allocate my.panels to ISPPLIB, the rexx is:
/* rexx */
address ispexec 'display panel(test)'
say rc /* show return code, will indicate possible errors */
if you use LIBDEF then the rexx is
/* rexx */
address ispexec "libdef ispplib dataset id(panel-dsn)"
say rc
address ispexec 'display panel(test)'
say rc /* show return code, will indicate possible errors */
The Edit Macro guide has a list of services (and there return-codes)
If you allocate the panel to the panel library, you can also us the ispf test mode (ispf 7.1 ??? its been a while since I used the Mainframe) to test it

- 10,358
- 1
- 27
- 38
-
I am not able to see the panel while executing the above command. Could guide me on how to view the panel – Karthick Kathiresan Aug 14 '13 at 16:18
-
1Are there any messages ???, also display the return code and look it up in the ISPF manual. Finally I have added some extra information at the end of my answer – Bruce Martin Aug 15 '13 at 01:36
-
Thanks Bruce and finally it is working now. Thanks for all your help:) – Karthick Kathiresan Aug 19 '13 at 12:26