IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

List only particular members in a PDS


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Wed Dec 15, 2010 12:52 am
Reply with quote

Hi all,

I want to list only the particular members in a PDS.

Eg. Members with name as ***X##%
where
*** can be AAA,BBB,CCC, .. HHH. only
## can be 01,02,03,04. only
% can be anything from A to Z.

Eg. member name are as below
AAAX01% - can be AAAX01A,AAAX01B,AAAX01P
AAAX02% - can be AAAX02P
AAAX03% - can be AAAX03B
AAAX04% - can be AAAX04A
........ etc.

i should list out the members of as above.

The logic i am using now, is form all possible member name and check if the member is existing in the PDS. If found display, else continue. But this is taking time, as i need to check for all possible(8*4*26) member names.

Is there any other logic other than this.. just to display the member from the PDS, which the above pattern.

Please help!!
Thank you.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Dec 15, 2010 1:05 am
Reply with quote

Try the ISPF Service LMMLIST with the PATTERN keyword.

O.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Dec 15, 2010 1:37 am
Reply with quote

bhagyac wrote:
But this is taking time, as i need to check for all possible(8*4*26) member names.

No, you don't. In addition to using ofer71's suggestion, perform your most restrictive test first. If the fourth character of the name is not an 'X', then you needn't bother checking the rest of the name; it doesn't qualify.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Dec 15, 2010 1:57 am
Reply with quote

I don't understand - how long could it possibly take? If you had three tables:

tbl1 = 'AAA BBB CCC DDD EEE FFF GGG HHH'
tbl2 = '01 02 03 04'
tbl3 = 'A - Z'

then how long could it take to just check the positions against the tables:

If the fourth character is an 'X', and the first three are in tbl1, the fifth & six are in tbl2, and the seventh is in tbl3, then it's a match.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Dec 15, 2010 2:47 am
Reply with quote

Because there is not that many, I think you can manage it in small arrays. I think you can do something like this:

Code:

a.1 = 'AAA'; a.2='BBB'; a.3='CCC';a.0=3
c = 'ABCDEFGH'

Do x = 1 to a.0
  Do y =  1 to 4
     Do z= 1 to length(c)
        sfx = substr(c,z,1)
        dsname = "'my.pds("a.x || 'X0' || y || sfx ")'"
        If SYSDSN(dsname) = 'OK' Then
           say 'dsn exists'  dsname
     End
  End
End


But it sounds like you were trying that before. But 8*4*26 is only 832 times. It should not take that long that you will even notice.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Dec 15, 2010 2:51 am
Reply with quote

Pedro wrote:
But 8*4*26 is only 832 times. It should not take that long that you will even notice.

But then the exec has to wait for the six batch jobs to finish before it can check the next name... icon_wink.gif
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Wed Dec 15, 2010 3:47 pm
Reply with quote

Thanks all..
I want to go with ofer71's and Akatsukami's ideas..

I am not able to find the details reg
"ISPF Service LMMLIST with the PATTERN keyword." in the both the REXX materials available in the forum..

Could any one please provide me any example how that can be used?
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Wed Dec 15, 2010 4:03 pm
Reply with quote

i myself managed to get it..

the link is below.. FR..

publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ISPZSG40/2.38?SHELF=ispzpm40&DT=20050713030339

I Will come back if i have any doubt, incase i need any help. icon_smile.gif

Thanks to all once again..
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Thu Dec 16, 2010 7:25 pm
Reply with quote

Hi all..

i just realised that i am making my logic more complicated..

This is my full task..
I want to check the number of steps in the below members..

member name are as below
AAAX01% - can be AAAX01A,AAAX01B,AAAX01P
AAAX02% - can be AAAX02P
AAAX03% - can be AAAX03B
AAAX04% - can be AAAX04A
........ etc.

I feel it could be done easier using ISRSUPC as well..
but not getting the idea how to start and bit confused..

My output dataset should like as..
Main - type - member - No of steps
AAA - 01 - AAAX01A - 130
AAA - 01 - AAAX01B - 23
AAA - 01 - AAAX01P - 122
--------------------------------------
AAA - 02 - AAAX02P - 25
--------------------------------------
AAA - 03 - AAAX03B - 72
--------------------------------------
AAA - 04 - AAAX03A - 32
--------------------------------------
......

HHH - 04 - HHHX04A - 23
HHH - 04 - HHHX04C - 43
HHH - 04 - HHHX04E - 56
HHH - 04 - HHHX04F - 124
HHH - 04 - HHHX04G - 201
HHH - 04 - HHHX04Y - 220

Can any one please suggest some easy method to achive this..
I have a freedom to do it in JCL/REXX/PLI. icon_smile.gif
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Dec 16, 2010 7:41 pm
Reply with quote

How do you determine the "number of steps" of whatever it is that those PDS's contain?
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Thu Dec 16, 2010 7:44 pm
Reply with quote

by counting the number of occurance of the word
"//step" in the 1st column.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 16, 2010 7:55 pm
Reply with quote

ISRSUPC with parm= IDPFX will insert the member name on each line.

srchfor 'STEP'
CMPCOLM 2:12




write a quick and dirty rexx (or even sort),
to accum the number of steps in each member.

only problem is if someone/something has inserted a jobstep without
the required 'STEP' as part of the Step Reference Name.
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Thu Dec 16, 2010 8:08 pm
Reply with quote

all the steps will start as "STEP" only...

I am totally confused, by trying so many things..
can any one please give the proper steps(efficient) steps so that i can work on it..

I dont want to write codes unnecessarily, when there is already some easy way to do it..

Please help..
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Dec 16, 2010 8:53 pm
Reply with quote

bhagyac wrote:
all the steps will start as "STEP" only...

Frankly, I wouldn't give credence to this for a second; I spend too much time correcting the brittle macros written by my site's off-shore "analysts", that search for irrelevant tokens ("STEP30"? And what if someone adds a step between STEP20 and STEP30 and then renumbers them all) or even use absolute line numbers. I'd recommend searching for an approximation of what the JCL interpreter uses to define a step.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Dec 16, 2010 11:12 pm
Reply with quote

Your JCL can execute a PROC which might expand into multiple job steps.
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Thu Dec 16, 2010 11:35 pm
Reply with quote

Quote:
that search for irrelevant tokens ("STEP30"? And what if someone adds a step between STEP20 and STEP30 and then renumbers them all)


We use only "//STEP<num> format always..
not bothered, if any step is added between STEP20 and STEP30.. The requirement is to list the similar proc(similar by name Eg. AAAX01*), with the no. of steps in each PROC. If suppose, AAAX01A has 255 steps, then we need to use AAAX01B to add the STEPS. (for new requirment)

As of now, we are opening, all the 7 PDS lib, and in each PDS, open the member(all the members of 4 types) and check which is having space to accomodate the new steps..

Unfortunaly, for each type of PROC, many members were created.. so we have to check all the AAAX01* members..

I dont want to spend time doing this.. instead jus submit a job or write a rexx, which would generate the all those particular members with the number of steps.. so that the programmer can decide just by looking into the report, which member to use, to add the new steps..

Hope i made the requirement clear..
Please help me how i need to proceed..

Thanks in advance..
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Thu Dec 16, 2010 11:38 pm
Reply with quote

Quote:
Your JCL can execute a PROC which might expand into multiple job steps.


the problem here is i dont know how many procs are there of each type..
Eg, AAAX01* are there.. there could be 2 or 3 or 10 or any..

Then how can i??
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Dec 16, 2010 11:54 pm
Reply with quote

bhagyac,

I think Dick has the 'easiest' approach:
Quote:
ISRSUPC with parm= IDPFX will insert the member name on each line.

srchfor 'STEP'
CMPCOLM 2:12




write a quick and dirty rexx (or even sort),
to accum the number of steps in each member.

only problem is if someone/something has inserted a jobstep without
the required 'STEP' as part of the Step Reference Name.



The real trouble here is your attitude. More than once you say you want an 'easy way' to do this.

Well guess what THERE IS NO EASY WAY.

You also say
Quote:
I dont want to spend time doing this.. instead jus submit a job or write a rexx


Well guess what YOU WILL HAVE TO SPEND SOME TIME ON THIS!

Are you getting paid for this?

No one else is getting paid to help you.

Take their FREE suggestions, and do what YOU get paid for.
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Fri Dec 17, 2010 12:10 am
Reply with quote

Thank you daveporcelan..

Quote:
The real trouble here is your attitude. More than once you say you want an 'easy way' to do this.


You miss took my attitude.. i didnot mean in the way you took it.. Actually, i sent so much time to half of my requirment, using a round about way.. and when i read the other forums,i found that it could be done in a better easy way.. unless, i know all the commands available in rexx i can use the appropriate one..

Thats why i am discussing with every one here through this forum..

Quote:
Well guess what YOU WILL HAVE TO SPEND SOME TIME ON THIS!


I am very much READY to..

Let me try Dick's idea.. I am learning abt the same..

Any other suggesstion are also most welcome..
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 17, 2010 12:19 am
Reply with quote

Hello,

Quote:
You miss took my attitude.. i didnot mean in the way you took it..
Unfortunately, this happens rather often. . . In addition to trying to find a technical solution, the poster is usually posting in a language (English) that is not their first/best language.

Some people are just looking for someone else to to the work for them.

Many are trying to use the forum as intended.

It is quite difficult to recognize the difference.

Some of us may "fuss" about what/how something is posted, but we're still here to help icon_smile.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Dec 17, 2010 12:28 am
Reply with quote

I think you can do it in two steps.

1) Do the ISRSUPC as suggested above. Send the output OUTDD to a dataset (lrecl 133)

2) Perform a Sort with that as input. Search this forum for these keywords for examples of:
INREC
INCLUDE
BUILD
SORT
SUM FIELDS

Your INREC will INCLUDE the member pattern for only those you want, and //STEP and not = //STEPLIB

Your BUILD will build a record of the member name, the concatenation number eg (1), (2), and put a 0001 at the end of each record.

You SORT will be the member name and concatenation number with a sum fields= the colmns with the 0001.

Notice I gave you no syntax, but pretty much told you what to do.

The good part here is you will have a chance to use your brain and figure the rest out for your self.
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Fri Dec 17, 2010 12:31 am
Reply with quote

sure!! Let me start trying!!
Thank you so much..
Back to top
View user's profile Send private message
bhagyac

New User


Joined: 17 Apr 2008
Posts: 44
Location: bangalore

PostPosted: Fri Dec 17, 2010 1:10 pm
Reply with quote

When i use IDPFX, and i submit the job, i am getting the below message in my output..

Code:
EXTRANEOUS OR CONFLICTING PROCESS OPTION(S) WERE SPECIFIED.
 IDPFX                                                     


and also i dont find any difference( other than the above message getting displayed) by using IDPFX and without using IDPFX.

Can any one please help?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Dec 17, 2010 3:10 pm
Reply with quote

try the following parm :

PARM=(SRCHCMP,IDPFX,NOPRTCC)
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Dec 17, 2010 6:55 pm
Reply with quote

It would be best if you show your complete JCL and the a more significant amount of your output.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts List of quiesced jobs JCL & VSAM 3
Search our Forums:

Back to Top