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

expansion of copy-book using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Tue Jul 07, 2009 4:25 pm
Reply with quote

I have a requirement.

I have copy name, when I give some command like
TSO EXEC copy-name......
it should search the copy book in predefined libraries and expand the copy book in one of screen in an ispf panel.

Please help me out in this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 07, 2009 4:47 pm
Reply with quote

What do you mean by expand ?
Back to top
View user's profile Send private message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Tue Jul 07, 2009 4:49 pm
Reply with quote

expand in the sense.....the member of pds should be opened...
nothing but copy-book should be opened
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 07, 2009 4:54 pm
Reply with quote

So from my understanding, what you want is a utility to open a given member name from within a given list of PDS names, without you either knowing or caring which PDS the member resides in.
Back to top
View user's profile Send private message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Tue Jul 07, 2009 5:30 pm
Reply with quote

Yes....whatever u have understood is correct....
when it open the given member name .....PDS name will automatically be displayed

For E...g

TEST.NAZIA.PDS(COPYBBOK NAME)
RECORD LAYOUT
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 07, 2009 5:34 pm
Reply with quote

How will this REXX know which libraries to search. Will it be fixed or variable with each execution ?
Back to top
View user's profile Send private message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Tue Jul 07, 2009 5:37 pm
Reply with quote

fixed set of libraries...

everytime the libraries wil be the same(may be 2 or 3) where the copybook will be searched
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 07, 2009 5:45 pm
Reply with quote

Then the code should check each library for the selected member, and once found should execute an ISPF EDIT macro to open it.
Back to top
View user's profile Send private message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Tue Jul 07, 2009 5:52 pm
Reply with quote

Can you give idea in detail ...how to implement the code???
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 07, 2009 6:10 pm
Reply with quote

- - - Invoke REXX code by whatever method you want
Display panel to user
User enters member name in panel
Check eack predefined library for existence of member
- If not found in list issue error message on panel
- If found, then open copybook on panel
Go back to original display
- If no further members requested, EXIT
- Else reexecute previous logic.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Tue Jul 07, 2009 6:15 pm
Reply with quote

searching for 'copybook rexx' I've found this topics...

www.ibmmainframes.com/viewtopic.php?t=36803
www.ibmmainframes.com/viewtopic.php?t=40023
www.ibmmainframes.com/viewtopic.php?t=9025

hth
Back to top
View user's profile Send private message
d_pansare

New User


Joined: 25 Apr 2009
Posts: 20
Location: Pune

PostPosted: Tue Jul 07, 2009 8:42 pm
Reply with quote

If you are not comfortable with ISPF panels, then you can have your code reduced to take the member name from command prompt itself.

Take the value of member name in variable using ARG keyword..
use SYSDSN function to find the member in predefined PDS name and once you get it, use simple ISPF browse or edit macro to display it..

Here it should be noted that if you have similar member name in two diff PDS then the first PDS which program will check will be displayed in browse or edit mode..


let me know if you need sample code.. it would be altogethter 10 - 15 lines of code depending upon number of pre defined libraries you have...
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Jul 07, 2009 11:03 pm
Reply with quote

If you want to make changes to the copybook and you are using a source control system (Librarian, SCLM, Endevor, Changeman, etc) , be sure that you open it in a way that your source control system understands. If you haven't checked out the member, you can't save your changes. Or worse, if your source control system (or RACF etc) doesn't stop you and it stores members in PDS files, you might make changes to an original file in the controlled libraries and cause problems.
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 Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top