|
|
| Author |
Message |
pnkumar Warnings : 2 New User
Joined: 27 Oct 2005 Posts: 8
|
|
|
|
Hi ALL ,
Here is Very EXhaustive REXX Exercise i have ,Could any one help me in
in Design( how to do it ) and if possible Various REXX Utilites to Achive the following Task .
If i want to write a REXX Macro to view a Copybook Member inside a Cobol Program Member just by keeping Cursor on that Copybook??
Let us assume i have a Cobol Program(MYPGM) in one of My PDS TS.USER.PDS and in the Program MYPGM i have a copybook called AMBSRL ,so now if i put cursor on the Copybook(AMBSRL) in MYPGM and run the MACRO at Command line then it should open that Copybook in VIEW mode and after Pressing F3(BACK) ,we should return back to Program MYPGM.
Thanks in advance ,
Pallavi |
|
| Back to top |
|
 |
References
|
Posted: Tue Feb 14, 2006 8:47 pm Post subject: Re: Need REXX Macro which should open a Member in View Mode ??? |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3000 Location: Charlotte,NC USA
|
|
|
|
| You don't have to write it. It's called ZOOM and it's an ISPF EDIT Macro (I have no idea what a REXX macro is) written in REXX that does just what you want. Most shops already have it, but if you don't, you should be able to locate the source code with some Internet searching. |
|
| Back to top |
|
 |
mak_tcs
Active User
Joined: 23 Nov 2005 Posts: 76 Location: Minneapolis, MN USA
|
|
|
|
Hi Pallavi,
The task is not that exhaustive. It hardly includes 5-10 lines of Rexx code.
There is macro command which will give the content of Cursor pointed line. Parse the line and get the coppybook name. then there is a single macro which opens a dataset in either browse/view/edit mode. So use it to view your copybook PDS member. Simple!!!
Note: You try it and in the worst case i can give the code.
Thanks,
Mani |
|
| Back to top |
|
 |
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 192 Location: India
|
|
|
|
Hi Pallavi,
I am sending you the sample code for your purpose. But the DSN where the copybook resides is hard-oded. Change it accordingly.
address ispexec "control errors return"
address ispexec
address isredit
"macro"
dsnname = AAAA.BBBB.CCCC.COPYLIB'
cpyname = ''
"(ros, cos) = cursor"
"(memline) = line .zcsr"
if(index(memline,'COPY') \= 0 & index(memline,'INCLUDE') \= 0) then
cpyname = word(memline,2)
if(substr(memline,1,4) = '-INC') then
cpyname = word(memline,2)
if(cpyname = '') then do
say 'S -> Cursor not in place...'
exit
end
address ispexec
"lminit dataid(dsid) dataset ('"dsnname"') enq(shr)"
"view dataid("dsid") member("cpyname")"
"lmclose dataid("dsid")"
"lmfree dataid("dsid")"
"end"
exit |
|
| Back to top |
|
 |
Reema Naik
New User
Joined: 24 Apr 2008 Posts: 5 Location: india
|
|
|
|
Hi Pallavi.
I am facing the same problem like yours. i want to create a REXX utility for opening a called program following CALL, its similar to what you wanted to create earlier for opening copybooks. In my case it is to open a Called Program.
eg:
CALL Prog2
Thanks in advance
Reema |
|
| Back to top |
|
 |
|
|