Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

List only particular members in a PDS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: List only particular members in a PDS
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: 2360
Location: Israel

PostPosted: Wed Dec 15, 2010 1:05 am    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Wed Dec 15, 2010 1:37 am    Post subject: Re: List only particular members in a PDS
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

Moderator Team Head


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

PostPosted: Wed Dec 15, 2010 1:57 am    Post subject: Reply to: List only particular members in a PDS
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

Senior Member


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

PostPosted: Wed Dec 15, 2010 2:47 am    Post subject: Reply to: List only particular members in a PDS
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: 1738
Location: Bloomington, IL

PostPosted: Wed Dec 15, 2010 2:51 am    Post subject: Re: Reply to: List only particular members in a PDS
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    Post subject:
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    Post subject:
Reply with quote

i myself managed to get it..

the link is below.. FR..

http://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    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Dec 16, 2010 7:41 pm    Post subject: Reply to: List only particular members in a PDS
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    Post subject:
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    Post subject:
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    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Thu Dec 16, 2010 8:53 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Dec 16, 2010 11:12 pm    Post subject: Reply to: List only particular members in a PDS
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    Post subject:
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    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Dec 16, 2010 11:54 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Dec 17, 2010 12:19 am    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts reorder screeNS using SWAP LIST? mrsidhu12 TSO/ISPF 5 Thu Sep 01, 2016 2:19 pm
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us