Page 1 of 1

To update members of a PDS, by comparing values with PS file

PostPosted: Tue Feb 26, 2019 12:09 am
by Akshata
I am trying to change the password value present every member of a PDS, with the new password value present in a PS file(by comparing Username value).
PDS members:

Member1:
Image

Member2:
Image

Member3:
Image

PS file:
Image


Updated members of the PDS should look like below:

Member1:
Image

Member2:
Image

Member3:
Image


Note:
• There is no specific length defined for any values present in PDS/PS file, only User name value can be used to compare.
• Only password value needs to be changed in each PDS member
• There nearly 500 members to be updated as part of this change.

Please suggest the way to perform this change.

Thanks in advance.

Re: To update members of a PDS, by comparing values with PS

PostPosted: Tue Feb 26, 2019 1:40 am
by Pedro
First, you need to read the password file and separate the two blank delimited tokens so that you have the search-string in one variable and the password in another variable. Because there seems to be at least three userids involved, use a stem variable to keep track of the userid / password values.

Second, process each FTP member, one at a time, as follows:
a. read the member into a stem variable.
b. process each line of the stem variable, looking for each search-string in column 1.
c. when you find a match:
c1. replace the password in FTP stem variable
c2. write out the FTP stem variable to replace the member.

I mentioned stem variables twice... there should be two different stem variables.

Re: To update members of a PDS, by comparing values with PS

PostPosted: Tue Feb 26, 2019 1:41 am
by enrico-sorichetti
a solution with an ISPF edit macro might be simpler

that' s the reason I moved the original topic to the TSO & ISPF section

ad find extracting the line number would be much simpler than
process each line of the stem variable, looking for each search-string in column 1.

Re: To update members of a PDS, by comparing values with PS

PostPosted: Tue Feb 26, 2019 2:25 pm
by prino
Completely off-topic, but 500 passwords in plain text?

It's about time your auditors start making sure a few people get pink slips or the Indian equivalents!!!