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
 

 

Scan for Calls to DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
kctechpro2

New User


Joined: 27 Apr 2013
Posts: 7
Location: United States

PostPosted: Fri Sep 04, 2015 11:31 pm    Post subject: Scan for Calls to DB2
Reply with quote

We are outsourcing some of our applications to an external vendor. They are not documented. We need to identify all application calls to DB2. This includes Assembler, Cobol, Easytreive, SAS, and MarkIV. I've considered running AMBLIST against the loadlibs, but can't find the module tag to scan for. I'm also not sure what SQL keywords to scan for in the source. Anyone have some Tips/Hints?
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Sat Sep 05, 2015 1:05 am    Post subject:
Reply with quote

See if this helps and work with DBA,
http://www.ibmmainframes.com/about48299.html
Back to top
View user's profile Send private message
kctechpro2

New User


Joined: 27 Apr 2013
Posts: 7
Location: United States

PostPosted: Sat Sep 05, 2015 1:32 am    Post subject:
Reply with quote

Thanks Rohit! CRUD report looks promising.
Back to top
View user's profile Send private message
kctechpro2

New User


Joined: 27 Apr 2013
Posts: 7
Location: United States

PostPosted: Tue Sep 08, 2015 8:50 pm    Post subject:
Reply with quote

The CRUD report will work for compiled programs. However, we still have to scan interpreter based platforms like SAS, Easytreive, Etc. Any more suggestions?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue Sep 08, 2015 9:50 pm    Post subject:
Reply with quote

Quote:
However, we still have to scan interpreter based platforms like SAS, Easytreive, Etc. Any more suggestions?


Start coding. We have a 300 line Rexx program to scan SAS code for table usage.

It scans 2,500 SAS modules identifying 13,000 tables being used.
This takes 3 minutes to run.
Back to top
View user's profile Send private message
kctechpro2

New User


Joined: 27 Apr 2013
Posts: 7
Location: United States

PostPosted: Wed Sep 09, 2015 8:11 pm    Post subject:
Reply with quote

daveporcelan wrote:
We have a 300 line Rexx program to scan SAS code for table usage.


Gee - Thanks - Dave... icon_eek.gif any code samples or suggestions? I hate writing from scratch and I'm not having any luck with the CBT Tape or the dino ring.

Let's see:
1. Read Member
2. string each command into one string (there's the rub)
3. Search the string for SQL.
4. If then for found
Lather, rinse, repeat
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Sep 09, 2015 8:29 pm    Post subject:
Reply with quote

Quote:
Gee - Thanks - Dave... icon_eek.gif any code samples or suggestions? I hate writing from scratch and I'm not having any luck with the CBT Tape or the dino ring.


What were you looking for? Actual code?

I can't give any 'samples' as this code belongs to my company.
They paid a consultant an hourly sum to write this code from scratch.
I do not know how many hours it took, but it wasn't free.
I could get fired if I provide even a sample of it.

Your plan looks like you are heading in the right direction.

If you would have started writing instead of trolling for freebies, you would be half done by know.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Sep 10, 2015 1:58 am    Post subject:
Reply with quote

kctechpro2 wrote:
...we still have to scan interpreter based platforms like SAS, Easytrieve, Etc. Any more suggestions?
Using ISRSUPC may help. Everything you need to know is here.

kctechpro2 wrote:
I'm also not sure what SQL keywords to scan for in the source.
Start with "SELECT" or "SQLCA" for example. Once you've found a few programs, it will be easy to find the keywords common to all commands.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Sep 10, 2015 4:14 am    Post subject:
Reply with quote

EXEC SQL usually works as does SQLCODE
Back to top
View user's profile Send private message
kctechpro2

New User


Joined: 27 Apr 2013
Posts: 7
Location: United States

PostPosted: Thu Sep 10, 2015 6:13 pm    Post subject:
Reply with quote

Thanks Marso & Nic this was helpful. Any idea if there is a solid statement terminator for a DB2 SELECT in a COBOL? Also SAS?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Sep 10, 2015 6:43 pm    Post subject:
Reply with quote

Why not do some work and look at some COBOL and SAS program code that is executing SQL?
Or look up the relevant manuals to see how they specify the coding.
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 -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS TS 5.3 migr after DFHCSDUP UPGRA... Kyle Carroll CICS 6 Wed Aug 31, 2016 10:58 pm
No new posts Sending system service calls by AIBTDLI. lind sh IMS DB/DC 1 Wed Mar 16, 2016 6:51 pm
No new posts Using Wildcard for PDS names with PDS... PokerGuru CA Products 1 Fri May 22, 2015 2:30 pm
No new posts Static and Dynamic Calls with DB2 Pro... RahulChaudhari DB2 6 Sun Nov 30, 2014 1:37 am
No new posts table scan can cause deadlock over RID? dejunzhu DB2 10 Fri Jul 04, 2014 8:36 am


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