Description of CPLINKPW
Download count: 13 this month, 4322 altogether.
Downloads for CPLINKPW:
VMARC archive: v-9K
From Kris Buelens, IBM Belgium
The CPLINKPW module can be used to link to a minidisk without
the risk of falling in CPREAD for a password prompt.
Instead of the CPREAD, a special returncode tells which password (READ, WRITE or MULT) should be provided.
A program using CPLINKPW can then provide a panel where the enduser can enter the password and the program can retry the LINK command again with the password included.
Input parms: same as for a CP LINK command Output msgs: same as what CP LINK returns Return code: same as what CP LINK returns, including: 8015 tells that the READ password is required 8016 tells that the WRITE password is required 8017 tells that the MULT password is requiredFor the special return codes, a message is generated too:
Please provide the xxxxx password for uuuuuuuu vdev
Typical REXX example:
uid="MAINT"; cuu=193 ; addr=120 ; pwd="" do p=1 to 2 /* Try linking twice */ "PIPE COMMAND CPLINKPW" uid cuu addr "RR" pwd "|VAR MSG" if rc<8015 | rc>8017 | p>1 then leave pwd=Ask_the_password(msg) /* Prompt user for pswd */ end if rc<>0 then call ErrExit rc,msg /* LINK failed... */