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

Order to search CLIST if using ALTLIB ACTIVATE APP DSN() ?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Thu Apr 23, 2015 8:43 pm
Reply with quote

Hi ,

Just gor the question on whats the right order to search particluar CLIST BBBB if using ALTLIB?

Suppose we have CLIST AAAA in Date set AAAA.CLISTLIB also in the same dataset have CLIST BBBB

In CLIST AAAA got following code:

Code:
ALTLIB ACTIVATE APPLICATION(CLIST) +           
          DSNAME('BBBB.CLISTLIB')
   ISPEXEC SELECT CMD(BBBB PRODID(&PRODID))   


So if the program call CLIST AAAA , whats the right order to load CLIST BBBB?

Searching AAAA.CLISTLIB first then if not found go to BBBB.CLISTLIB ???

Thanks!!!!
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Apr 23, 2015 9:42 pm
Reply with quote

I think if it was:
Code:
clist calling clist

then it would likely search in the same PDS first.

But your example is:
Code:
clist calling ISPF calling clist

so I think it will be the standard search order:
Code:
job pack area
tasklib
ISPLUSR
LIBDEF
ISPLLIB
TSOLIB
STEPLIB
LPA
LINKLIB
SYSUPROC
SYSUEXEC
ALTLIB
SYSPROC
SYSEXEC

I might have missed some. yeah, its complicated.

| I updated the list after Terry's question.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Thu Apr 23, 2015 9:46 pm
Reply with quote

Is SYSUPROC in that list somewhere?
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Apr 23, 2015 9:50 pm
Reply with quote

You can simplify the search by including a percent sign:
Code:
ISPEXEC SELECT CMD(%BBBB PRODID(&PRODID))

In which case, it will skip searching in load module data sets, only searching in SYSUPROC, SYSUEXEC, ALTLIB, SYSPROC, and SYSEXEC.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Thu Apr 23, 2015 10:05 pm
Reply with quote

Hi Pedro,

Thanks for your answer.

I did the testing, i place CLIST BBBB in both my ALTLIB and SYSPROC data set . then I do the DDLIST command --> Member BBBB
and shows found CLIST BBBB in sysproc data set first and then ALTLIB.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Thu Apr 23, 2015 10:21 pm
Reply with quote

why not run a simple test

put a write telling which is which.

faster than waiting for a forum reply"
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Thu Apr 23, 2015 10:28 pm
Reply with quote

Hi enrico-sorichetti,

Thanks for your answer. I am not doing CLIST alot. can you tell me how to use wirte to get that ?

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Thu Apr 23, 2015 10:35 pm
Reply with quote

for the umpteen time...
ALTLIB works at the logical search level

TSO,REXX,CLIST KNOW that there is an ALTLIB in place
and they will do a directed search in the ALTLIB stack
and if nothing is found it will search SYSEXEC/SYSPROC

ALTLIB alloates the altlibbed dataset using a SYSxxxxxx ( xxxx is a NUMBER )
and using isrddn You will see it after SYSPROC
giving the impression that it will come after.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Thu Apr 23, 2015 10:44 pm
Reply with quote

no need to write a clist
a simple rexx 2liner will do ( the alt lib logic is the same )

Code:
/* REXX */
say "NAME OF THE DATASET WHERE I AM STORED"


store it in two libraries
one in the SYSPROC/SYSEXEC concatenation

the other one anywhere You want

from ISPF option 6
run it without the ALTLIB
issue the ALTLIB
run it again
issue an ALTLIB DEACTIVATE

and everything will be back as it was
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Thu Apr 23, 2015 10:45 pm
Reply with quote

Hi enrico-sorichetti

Thanks for your answer. it helped a lot!

For second part of your answer "
ALTLIB alloates the altlibbed dataset using a SYSxxxxxx ( xxxx is a NUMBER )
and using isrddn You will see it after SYSPROC
giving the impression that it will come after.
"

that means when you use DDLIST --> Member CLIST BBBB. The displayed order is not acutlly searching order ?

Thanks
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Apr 23, 2015 11:12 pm
Reply with quote

Quote:
when you use DDLIST --> Member CLIST BBBB. The displayed order is not acutlly searching order ?

As far as I know, it only displays in order of DD name. It does not display in order of the standard search order.

When you search the DD name list, the list remains in the original order.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Thu Apr 23, 2015 11:13 pm
Reply with quote

Thank you for the answer ! Now it much clear !
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 17
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Rotate partition-logical & physic... DB2 0
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top