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



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

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

Postby Akshata » Mon Feb 25, 2019 11:03 pm

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

Postby Terry Heinze » Mon Feb 25, 2019 11:57 pm

Please post your topic in an appropriate Forum. Maybe "CLIST & REXX"?
Last edited by Terry Heinze on Tue Feb 26, 2019 12:01 am, edited 1 time in total.
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

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

Postby enrico-sorichetti » Tue Feb 26, 2019 12:01 am

since most of the answer will be among the lines ...
use a rexx edit macro and apply it to all the pds members
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: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

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

Postby willy jensen » Tue Feb 26, 2019 2:55 pm

No standard utility to do this, but..
There are a couple of freewares to offload a pds to a sequential dataset, with IEBUPDTE ADD statements at the front of each member. PDSLOADW from CBTTAPE.ORG file 093 would be my suggestion.
As other have suggested perhaps an ISPF edit macro might be the simplest solution, here is a sample of mine:
/*                                                                 rexx  
  Run an ISPF Edit Macro against every member of named pds                
  Use from ISPF 3.4, or in batch as %thisname dsname                      
*/                                                                        
 Address Isredit "MACRO NOPROCESS (PRM)"                                  
 if rc=0 then Exit EditSect()                                            
 /* generate member list, run the edit macro against each */              
 parse source . . $me .                                                  
 arg dsn .                                                                
 zz=outtrap('lst.')                                                      
 "LISTDS" requote(dsn) "MEMBERS"                                          
 zz=outtrap('off')                                                        
 dsn = unquote(dsn)                                                      
 do n = 7 to lst.0                                                        
   Address ISPEXEC "EDIT DATASET('"dsn"("strip(lst.n)")') MACRO("$me")"  
 end                                                                      
 exit                                                                    
Requote: if arg(1)='' then return '';else return "'"Unquote(arg(1))"'"    
Unquote: return strip(space(translate(arg(1)," ","'")))                  
/* Edit macro section */                                                  
Editsect:                                                                
 Address Isredit                                                          
 "(ds)=dataset"                                                          
 "(mb)=member "                                                          
 "(l)= Line 1"                                                            
 l=strip(l,'t')                                                          
 /* do something to line 1 */                                            
 say ds mb 'line 1=' l                                                    
 "line 1 = (l)"                                                          
 "save"                                                                  
 "cancel"                                                                
 exit 0                                                                  
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post