Scanning through PDS using SYNCSORT



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Scanning through PDS using SYNCSORT

Postby RajeshT » Tue Nov 22, 2011 7:47 pm

Hi Everyone !!

Is it possible to scan through a PDS and search if a particular member is available in the PDS. I have about half a million PDS datasets that are to be searched for specific MEMEBERs within them inside. I have an input file listed with MEMBER name and the PDS name and i wanted to know whether the MEMBER is available in the PDS listed or not. please see the sample data from the input file below;

PID#SPW #910350.DBRMLIB           
PIDMDU1 #910350.DBRMLIB           
PEY2793 #911196.CFMPO.TDBRM       
TEC0992 #912.TECAPS.DBRMLIB       
TEC1914 #912.TECAPS.DBRMLIB       
DSNTIAD #955877.DSN710.DBRMLIB.DATA
ASNPRUNU#999336.HCHOI.SASNDBRM     
RPSSQL01#999609.SHRWARE.DBRM       
ASNMIG8 DB2.DPROP.SASNDBRM         
DSN8CC2 DB2ADM2.DBRMLIB.DATA       
MCMDBLG DB2P.DBRMLIB
MCMSPRN2DB2P.DBRMLIB


First 8 characters represents the MEMBER name and 44 characters from position 9 represent the PDS name.

Thank you for the assistance.
Rajesh.
RajeshT
 
Posts: 22
Joined: Tue May 04, 2010 10:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Scanning through PDS using SYNCSORT

Postby enrico-sorichetti » Tue Nov 22, 2011 8:08 pm

If You want good answers learn to post good questions
Scanning through PDS using SYNCSORT

most probably the reply will be ... IT CANNOT BE DONE
why not just describe the requirement and let the people willing to help provide advice on the most appropriate solution ?

asking questions in this way is like asking... how to drive a nail with a screwdriver
and expect good replies
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: Scanning through PDS using SYNCSORT

Postby RajeshT » Tue Nov 22, 2011 8:16 pm

Hi Enrico,

I wanted to confirm if there is a way to get this done through syncsort. I welcome if there are solutions using REXX / CLIST, am not familiar with any of them though. Thank you for the response.

rajesh.
RajeshT
 
Posts: 22
Joined: Tue May 04, 2010 10:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Scanning through PDS using SYNCSORT

Postby Akatsukami » Tue Nov 22, 2011 8:49 pm

RajeshT wrote:Hi Enrico,

I wanted to confirm if there is a way to get this done through syncsort. I welcome if there are solutions using REXX / CLIST, am not familiar with any of them though. Thank you for the response.

rajesh.

Tested, but 95% of error checking omitted. If you've really got 500,000 PDSs, run it in the background.

/* Rexx */                                                             
/* Written Heisei 23.11.22 BY Akatsukami-sama                        */
  trace o                                                             
  arg inputds .                                                       
  "ALLOC DA('"inputds"') FI(TULIN) SHR REU"                           
  "EXECIO 1 DISKR TULIN"                                               
                                                                       
  do while (rc=0)                                                     
    pull line                                                         
    member   = strip(substr(line,1,8))                                 
    library  = strip(substr(line,9,44))                               
    searchds = library'('member')'                                     
    rs       = sysdsn("'"searchds"'")                                 
                                                                       
    select                                                             
      when (rs="OK") then                                             
        say member "found in library" library                         
      when (rs="MEMBER NOT FOUND") then                               
        say member "not found in library" library                     
      otherwise do                                                     
        say "Error searching for member" member "in library",         
            library "is:"                                             
        say "    " rs                                                 
      end                                                             
    end                                                               
                                                                       
    "EXECIO 1 DISKR TULIN"                                             
  end                                                                 
                                                                       
  "EXECIO 0 DISKR TULIN (FINIS"                                       
  "FREE FI(TULIN)"                                                     
  exit                                                                 
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Scanning through PDS using SYNCSORT

Postby RajeshT » Tue Nov 22, 2011 10:10 pm

Yeahh .. it worked. Thank you much Akatsukami !!

/***************REXX***********/                     
TRACE O                                             
INFILE1='#910116.SYSDBRM.DB2P.DT1121'               
"ALLOCATE FI(TULIN) DA('"INFILE1"') SHR REUSE"       
"EXECIO 1 DISKR TULIN"                               
DO WHILE (RC=0)                                     
    PULL LINE                                       
    MEMBER   = STRIP(SUBSTR(LINE,1,8))               
    LIBRARY  = STRIP(SUBSTR(LINE,9,44))             
    SEARCHDS = LIBRARY'('MEMBER')'                   
    RS       = SYSDSN("'"SEARCHDS"'")               
    SELECT                                           
          WHEN (RS="OK") THEN                       
            SAY MEMBER "FOUND IN LIBRARY" LIBRARY   
          WHEN (RS="MEMBER NOT FOUND") THEN         
            SAY MEMBER "NOT FOUND IN LIBRARY" LIBRARY
          OTHERWISE DO                               
            SAY "ERROR SEARCHING FOR MEMBER" MEMBER "IN LIBRARY",
                LIBRARY "IS:"                                   
            SAY "    " RS                                       
          END                                                   
    END                                                         
"EXECIO 1 DISKR TULIN"                                           
END                                                             
"EXECIO 0 DISKR TULIN (FINIS"                                   
"FREE FI(TULIN)"                                                 
EXIT


Thank you Enrico for your suggestion. Everyone have a good one ahead.

Rajesh.
RajeshT
 
Posts: 22
Joined: Tue May 04, 2010 10:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Scanning through PDS using SYNCSORT

Postby pjagathis » Thu Dec 01, 2011 3:02 pm

Hi Rajesh/Akatsukami,

Please let me know what we want ot give in INFILE1...
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: Scanning through PDS using SYNCSORT

Postby NicC » Thu Dec 01, 2011 6:23 pm

Suggest you read the first post in the topic. Or...analyse the code. If you cannot do the latter then do not try to use this.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post