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
 

 

Rexx code to scan for a field/copy book in program libraries

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
murshad paramba

New User


Joined: 14 Oct 2008
Posts: 12
Location: calicut

PostPosted: Wed Oct 15, 2008 1:44 pm    Post subject: Rexx code to scan for a field/copy book in program libraries
Reply with quote

Hi All,

I am Murshad,working as Senior software engineer in a MNC in India.
I need a help from Rexx experts.I am trying to develop a tool in Rexx.The tool is intended to scan a field/copy book in the program library.
I need two more addition features in this tool.

1.The result should not have commented codes.By this i mean,say a field ABC is in program PGM1 and PGM2.In PGM1,the statement which contains the field ABC is commented.So the result of scan should only contains PGM2.
2.I wish to include more than one library in a single scan.


If anyone knows complete code which works perfectly,please post it to me.



Thnx,
Murshad NP
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 15, 2008 1:55 pm    Post subject:
Reply with quote

What is the criteria for being considered as a commented line

Including multiple libraries is not a problem.

Quote:
If anyone knows complete code which works perfectly,please post it to me.

Why would we have a version of a complete code for your requirement ?

What have you developed yourself so far ?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Oct 15, 2008 2:00 pm    Post subject: Reply to: Rexx code to scan for a field/copy book in program
Reply with quote

Quote:
If anyone knows complete code which works perfectly,please post it to me.

give us a good reason to do it icon_evil.gif

start by posting something and we shall be glad to help if You have problems

Your requirement is not clear at all ...
what do You want to scan for ???

if You are looking for a copy/call cross reference start reading the ispf manuals,
and You will find the solution

or if You need to search/scan for predefined string use the srchfor uility
and write a rexx postprocessor to reformat the output to Your needs

if You want to get useful help You must make people willing and eager to help You
... asking for full code solution will lower/zero out Your benevolence factor
Back to top
View user's profile Send private message
murshad paramba

New User


Joined: 14 Oct 2008
Posts: 12
Location: calicut

PostPosted: Wed Oct 15, 2008 2:34 pm    Post subject: Rexx code to scan for a field/copy book in program libraries
Reply with quote

expat wrote:
What is the criteria for being considered as a commented line

Including multiple libraries is not a problem.

Quote:
If anyone knows complete code which works perfectly,please post it to me.

Why would we have a version of a complete code for your requirement ?

What have you developed yourself so far ?




Thnx for ur quick reply....
Answer to ur question "What is the criteria for being considered as a commented line
" is

I would explain it with a scenario.....
Say, we need to check in which all programs in a library uses a copy book.
For these we usually do a scan in the tool 'PDSMAN 7.60 - Ezyedit '.But in some programs the specified copybook will be commeted or it may be given as a description in the modification log.In the above scan these programs(ie programs in which copybook is commeted or given as a description in the modification) will also comes in the result list.
My intention is to avoid these programs(ie programs in which copybook is commeted or given as a description in the modification) in the result list.


I have started studying Rexx,but coulnt progress furthur bcoz nobody is here how knows Rexx to help me.I tried out a code which i got from NET ,but its not working fine

Thnx,
Murshad NP
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 15, 2008 2:51 pm    Post subject:
Reply with quote

Quote:
I would explain it with a scenario.....
Say, we need to check in which all programs in a library uses a copy book.
For these we usually do a scan in the tool 'PDSMAN 7.60 - Ezyedit '.But in some programs the specified copybook will be commeted or it may be given as a description in the modification log.In the above scan these programs(ie programs in which copybook is commeted or given as a description in the modification) will also comes in the result list.
My intention is to avoid these programs(ie programs in which copybook is commeted or given as a description in the modification) in the result list.

Which tells me absolutely nothing of any use. Excluding psyscic powers how would I determine if a line was commented of not.

Quote:
I have started studying Rexx,but coulnt progress furthur bcoz nobody is here how knows Rexx to help me.

Exactly the same as me ......... so I picked up the manual and tried things until they worked. But this was back in the days before the ease of posting on internet boards, so I had no other option. Give it a go, see how you get on. It works, believe me !
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Oct 15, 2008 2:54 pm    Post subject:
Reply with quote

If I understand you correctly, you can do that in SUPERC, including the option to ignore COBOL comment lines.

O.
Back to top
View user's profile Send private message
murshad paramba

New User


Joined: 14 Oct 2008
Posts: 12
Location: calicut

PostPosted: Wed Oct 15, 2008 3:00 pm    Post subject:
Reply with quote

expat wrote:
Quote:
I would explain it with a scenario.....
Say, we need to check in which all programs in a library uses a copy book.
For these we usually do a scan in the tool 'PDSMAN 7.60 - Ezyedit '.But in some programs the specified copybook will be commeted or it may be given as a description in the modification log.In the above scan these programs(ie programs in which copybook is commeted or given as a description in the modification) will also comes in the result list.
My intention is to avoid these programs(ie programs in which copybook is commeted or given as a description in the modification) in the result list.

Which tells me absolutely nothing of any use. Excluding psyscic powers how would I determine if a line was commented of not.

Quote:
I have started studying Rexx,but coulnt progress furthur bcoz


nobody is here how knows Rexx to help me.







could you please suggest some good books in Rexx which is eazy to understand and also contains examples???
Exactly the same as me ......... so I picked up the manual and tried things until they worked. But this was back in the days before the ease of posting on internet boards, so I had no other option. Give it a go, see how you get on. It works, believe me !
Back to top
View user's profile Send private message
murshad paramba

New User


Joined: 14 Oct 2008
Posts: 12
Location: calicut

PostPosted: Wed Oct 15, 2008 3:22 pm    Post subject:
Reply with quote

ofer71 wrote:
If I understand you correctly, you can do that in SUPERC, including the option to ignore COBOL comment lines.

O.



could you please elobrate your idea...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Oct 15, 2008 4:23 pm    Post subject: Reply to: Rexx code to scan for a field/copy book in program
Reply with quote

I am telling again why don' t You look at the ispf manuals
and investigate the use of the members part list ???

You can run it in foreground and/or in batch

and it will only take a simple post processor to get a nice report
on who is using what and the revers ( where used )

if You are not able to search her is a pointer to start with

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.f54u200/fmpl.htm

why reinvent the wheel
Back to top
View user's profile Send private message
murshad paramba

New User


Joined: 14 Oct 2008
Posts: 12
Location: calicut

PostPosted: Wed Oct 15, 2008 5:09 pm    Post subject: Re: Reply to: Rexx code to scan for a field/copy book in pro
Reply with quote

enrico-sorichetti wrote:
I am telling again why don' t You look at the ispf manuals
and investigate the use of the members part list ???

You can run it in foreground and/or in batch

and it will only take a simple post processor to get a nice report
on who is using what and the revers ( where used )

if You are not able to search her is a pointer to start with

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.f54u200/fmpl.htm

why reinvent the wheel





but we need this tool to be developed specificalli in Rexx..
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Oct 15, 2008 5:15 pm    Post subject: Reply to: Rexx code to scan for a field/copy book in program
Reply with quote

Quote:
but we need this tool to be developed specificalli in Rexx..


do You have a doctor prescription for that??? 12.gif
to implement something without having the skill to do it
or worse use somebody else' s code without understanding it

Your need is generic enough to be solved by standards tools
without the need to reinvent the wheel

from Your initial post
Quote:
...complete code which works perfectly...


from Your signature ...
Quote:
I wish to improve my knowledge by interacting with members in the community


You are not interacting .. You are asking somebody else to do Your work
Back to top
View user's profile Send private message
murshad paramba

New User


Joined: 14 Oct 2008
Posts: 12
Location: calicut

PostPosted: Wed Oct 15, 2008 5:52 pm    Post subject: Re: Reply to: Rexx code to scan for a field/copy book in pro
Reply with quote

enrico-sorichetti wrote:
Quote:
but we need this tool to be developed specificalli in Rexx..


do You have a doctor prescription for that??? 12.gif
to implement something without having the skill to do it
or worse use somebody else' s code without understanding it

Your need is generic enough to be solved by standards tools
without the need to reinvent the wheel

from Your initial post
Quote:
...complete code which works perfectly...


from Your signature ...
Quote:
I wish to improve my knowledge by interacting with members in the community


You are not interacting .. You are asking somebody else to do Your work





i think you have misunderstood me.....
actually i have read some Rexx manuls and start coding Rexx...but the code which i have done is not working fine...and i dont know a standard tool to debug Rexx code...
tats y i asked help from this forum...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 15, 2008 5:58 pm    Post subject:
Reply with quote

put TRACE I as the very first line after the header line, the one that contains /* REXX

and all will be revealed. However that information is readily available in the fine manual.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Oct 15, 2008 6:05 pm    Post subject:
Reply with quote

Again, if you want to list copybooks usage in PDS(s), SUPERC might be the almost perfect solution. You can also wrap it with REXX to filter/format the results.

O.
Back to top
View user's profile Send private message
murshad paramba

New User


Joined: 14 Oct 2008
Posts: 12
Location: calicut

PostPosted: Wed Oct 15, 2008 6:50 pm    Post subject:
Reply with quote

ofer71 wrote:
Again, if you want to list copybooks usage in PDS(s), SUPERC might be the almost perfect solution. You can also wrap it with REXX to filter/format the results.

O.




actually my intension is to list all the programs which uses the copy book usong a Rexx tool...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Oct 15, 2008 6:55 pm    Post subject: Reply to: Rexx code to scan for a field/copy book in program
Reply with quote

Quote:
actually my intension is to list all the programs which uses the copy book usong a Rexx tool...


Your stubborness resents something else
did You check ISPF member parts list
do You think that Your rexx tool might be better than an ISPF implemented tool ???

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispzu261/6.20?ACTION=MATCHES&REQUEST=member+part+list&TYPE=FUZZY&SHELF=ISPZPM61.bks&DT=20071211175702&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

and I' ll drop of the thread
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 15, 2008 6:59 pm    Post subject:
Reply with quote

Also, Ofers advice, has it been heeded. It can be invoked in REXX and the results edited in REXX.

Ofer and Enrico have both given good advice, but to me it seems that you only want to use pure REXX rather than the best available options to resolve your requirement.

Take your time and review all suggestions and your own desire to do this in pure REXX, weigh up the pros and cons of each one and decide which way to proceed and go do it.

But, these are experienced guys that you ignore at your peril.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Oct 15, 2008 7:29 pm    Post subject:
Reply with quote

murshad paramba,

you may have noticed a little resistance from some responders to your methodology.

using superc in batch, not only can you have multiple 'scanned libraries', you can have multiple search keys, for example 'include ' and 'copy '.
using superc options like
  • id??? (can't remember the spelling) will put the member name on every 'hit' line
  • cobcmt?? (another I can't remember) will not scan COMMENT lines
your rexx tool could then do some left and right shifting so that the copybook names would all be in the same column - thus sortable.

not only that, but superc will outrun your 'little tool' and you don't have to keep debugging it as well as deal with space problems.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 3 Mon Dec 05, 2016 11:57 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 5 Fri Dec 02, 2016 9:47 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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