ISPF Services, identify member-alias



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

ISPF Services, identify member-alias

Postby zpm0800 » Thu Sep 04, 2014 1:57 pm

Hello everybody!

This is my first posting on this board. I am completely new to the mainframe, haven't heard of z/OS before april this year... but I am learning.
Last week a colleague asked me to review all PROCLIBs on all LPARs and check if there are still procedures using //STEP EXEC PGM=ABC.
If so my job would be to change these members to //STEP EXEC PGM=DEFG.
By now I identified all members that need to be updated (I used ISPF 3.14 Search-For Utility) and there are about 150 or more members that need to be edited.
I decided not to spend hours with 'copy-and-paste' to finish the job and learn nothing new but instead wrote a REXX to do this using TSO command LISTDS and OUTTRAP function.
The REXX works fine, but:

Some of the members do have an alias member ( "TSO LISTDS 'DSN' MEMBERS" says for example: "ASMAC ALIAS(HLASMC)" )
The REXX ignores all members with an alias-member and prompts me to check these members manually, no problem so far.

Another colleague told me that this could also be done by ISPF Services instead of TSO commands, and since I wish to learn as much as possible I now write a REXX using
ISPF Services to do the exact same thing. This is what I have coded until now:

/* REXX */                                                           
DSLEV='AGMV800.GLOBAL.ZPM0800.TEST*'                                                                                                   
Address ISPEXEC                                                       
dslst.0 = 0                                                           
                                                                     
/* Build list of dataset(s)according to pattern DSLEV */             
"LMDINIT LISTID(LISTID)  LEVEL("DSLEV")"                             
Do While (rc = 0)                                                     
   "LMDLIST LISTID("LISTID") OPTION(LIST) STATS(YES) DATASET(DSVAR)" 
   If rc<>0 Then Leave                                               
   i = dslst.0 + 1                                                   
   dslst.i = strip(DSVAR)                                             
   dslst.0 = i                                                       
End                                                                   
"LMDFREE LISTID("LISTID")"                                           
                                                                     
/* Build list of members for each PO dataset */                       
Do i = 1 To dslst.0                                                   
   DSVAR = dslst.i                                                   
   "LMINIT DATAID(ID) DATASET('"DSVAR"') ENQ(SHR)"                   
   "LMOPEN DATAID("ID") OPTION(INPUT) ORG(ORG)"
   MEMBR=''                                                           
   Do While (rc = 0)&(ORG='PO')                                       
      "LMMLIST DATAID("ID") MEMBER(MEMBR) STATS(YES)"                 
      If rc <> 0 Then Leave                                           
      Say DSVAR"("strip(MEMBR)")"                                                       
   End                                                               
   "LMCLOSE DATAID("ID")"                                             
   "LMFREE  DATAID("ID")"                                             
End
Exit


This REXX using ISPF Services lists all members of the datasets that fit into the pattern DSLEV. The next step would be now to identify all members that have an alias-member (and skip them).

My question now is:
Does ISPF Services provide any function to identify the alias members and their original members like "TSO LISTDS 'DSN' MEMBERS" does?

The only function I found going this way is LMMDISP, but this function opens a panel displaying the members... maybe there is a way to suppress the display panel? I am a bit at a loss now with the ISPF Services... :(


With best regards, Martin
zpm0800
 
Posts: 1
Joined: Wed May 21, 2014 12:25 pm
Has thanked: 0 time
Been thanked: 0 time

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post