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

REXX to view the PGM or PROC


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: Tue Jun 20, 2017 1:20 am
Reply with quote

Hi Experts,

I am searching for the REXX macro or any ISPF function in REXX to open the PGM or PROC in JCL. Just like you can use "ISPEXEC BROWSE DATASET(" || DsNamQ || ")" to browse the data set in REXX so any similar thing or macro that works for PGM= or PROC= ?

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 20, 2017 1:37 am
Reply with quote

and what do You expect to see/understand when browsing a load module?

while it is easy to extract whatever token You might want using an edit macro

finding the target of an exec it will not be easy ...
a program might reside in a strplib/joblib dsname or anywhere in the linklist concatenation

and a proc will be somewhere in the proclib concatention og the JES procedure
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Tue Jun 20, 2017 1:41 am
Reply with quote

Shouldn't be too difficult. You still use the ISPEXEC BROWSE function, you just have to supply the name of your procedure libraries or source libraries, as appropriate.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 20, 2017 1:43 am
Reply with quote

and what do You expect to see/understand when browsing a load module?

while it is easy to extract whatever token You might want using an edit macro

finding the target of an exec it will not be easy ...
a program might reside in a steplib/joblib dsname or anywhere in the lnklist concatenation

and a proc will be somewhere in the proclib concatention of the JES procedure
or in a PROCxxx referred dsname
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jun 20, 2017 3:27 am
Reply with quote

When you view a PGM you are looking at the load module. And a load module looks like:
Code:
 BROWSE    RLS.PROGRAM.LOAD(MF0016)                   Line 00000001 Col 001 080
 Command ===>                                                  Scroll ===> CSR 
IEWPLMH ...Ì......µ............Ì...........ð...........m...h...................
CCEDDDC40007000000A0000000000007000100000008000000000009000800000001000200000004
9567348000083000000000080100000800040200000C00080300000400080400001C000405000010
 ------------------------------------------------------------------------------
å00..CEE.......Çå00.°Ö}. .0.qÕ0................Ö...µ...*...^................ì0C.
4FF10CCC000300064FF09ED041F29EF30F0000000003000E000A0005000B00020000000100005FC1
70041355002000C870010C0C10048F047F000000001800DC00C0000C0000000400E400880000803C
 ------------------------------------------------------------------------------
åø°æì00.ì\B½ß0ÕÐåØk>n.BÞåØj© .µ.ì.}.ì.}.ì.B4ì...ì.. ..åØj.j...åøj.j ..åØjømÙ{.ì\
47995FF15ECB5FEA489690CA489B42A150D151D153CF5331533413489090304790943048979FC05E
700C8000802890FC702E552E701410088004800880248008800023701418097014100970104D0280
 ------------------------------------------------------------------------------
C_WSA           ............14343511...*... ....................................
C6EEC44444444444000000000000FFFFFFFF00050004000000000000000000000000000000000000
3D6210000000000000000000000014343511000C0090000640000000000000000000000000000000
 ------------------------------------------------------------------------------
Ø...Ø...............................................SDSD................Ø...Ø...
8000800000000000000000000000000000000000000000000000ECEC000000000000000080008000
000D000D00000000000000000000000000000000010100000000242400000000030400000006000D
So, as you were asked, precisely what do you think you will gain by looking at this?
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Tue Jun 20, 2017 6:30 pm
Reply with quote

Thank you for the answer!

Yes, this is the program is somebody wrote in our place but he is retired and currently this feature is not working so i am looking at this rexx couldnt find the actually logic to load the PROC or PGM. I think the developer would like to see the load module or PROC.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Jun 20, 2017 7:05 pm
Reply with quote

Quote:
he is retired and currently this feature is not working


why not try to find the source ???
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Jun 20, 2017 9:07 pm
Reply with quote

Quote:
so i am looking at this rexx couldnt find the actually logic to load the PROC or PGM


You need to turn on a rexx trace... find where the BROWSE service is invoked and work your way backwards to where the name of data set being browsed was set.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Wed Jun 21, 2017 6:16 am
Reply with quote

The "logic" to load and run a load module or program object is part of the operating system. No part of it is in a load module or program object.

A tiny part of the logic to transition between phases of a planned overlay load module is included in the root phase of a planned overlay load module. A trained programmer might recognize this fragment.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Jun 21, 2017 2:58 pm
Reply with quote

I am confused as to what is actually required - aprogram to determine from the spool output of a job as to where the procedure was read in from or the load library used, or a 'zoom' feature that goes to the source of the object designated by the EXEC statement currrently 'under' the cursor within the spool listing, or something completely different.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Jun 21, 2017 9:40 pm
Reply with quote

Quote:
The "logic" to load and run a load module or program object is part of the operating system.


True. But you can somewhat mimic this process by writing the rexx program to examine the JCL and searching the member lists of the data sets listed in JCLLIB, JOBLIB, STEPLIB, etc... This will work in general, but I see from other comments that there are exceptions.

ps. I also do not know if this is JCL to be submitted or output from a completed job. but I think the above can be made to work in either case.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Jun 21, 2017 9:48 pm
Reply with quote

Quote:
precisely what do you think you will gain by looking at this?


The original poster might have different requirements...

I add 'eyecatchers' to the programs I work on. This is a constant that identifies the maintenance level of the csect. There have been instances where the customer insists he is using version 2.1, for example, but the dump shows version 1.5.

It is an eyecatcher because even though the overall module is in binary, the text constants are readable and stand out, drawing your attention, catching your eye.
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