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



IBM's Command List programming language & Restructured Extended Executor

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

Postby Akshata » Tue Feb 26, 2019 12:09 am

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.
Akshata
 
Posts: 2
Joined: Fri Feb 22, 2019 4:23 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Pedro » Tue Feb 26, 2019 1:40 am

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.
Pedro Vera
User avatar
Pedro
 
Posts: 622
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 44 times

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

Postby enrico-sorichetti » Tue Feb 26, 2019 1:41 am

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.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2914
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 154 times

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

Postby prino » Tue Feb 26, 2019 2:25 pm

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!!!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 601
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 27 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post