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

Scan for Calls to DB2


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
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
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

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

See if this helps and work with DBA,
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
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
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: 792
Location: Pennsylvania

PostPosted: Tue Sep 08, 2015 9:50 pm
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
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: 792
Location: Pennsylvania

PostPosted: Wed Sep 09, 2015 8:29 pm
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: 1353
Location: Israel

PostPosted: Thu Sep 10, 2015 1:58 am
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: 2455
Location: Hampshire, UK

PostPosted: Thu Sep 10, 2015 4:14 am
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
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: 2455
Location: Hampshire, UK

PostPosted: Thu Sep 10, 2015 6:43 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Pipeline scan problem CICS 1
No new posts JAVA equivalent for IMS DL/I calls IMS DB/DC 2
No new posts CICS TS 5.3 migr after DFHCSDUP UPGRA... CICS 6
No new posts Sending system service calls by AIBTDLI. IMS DB/DC 1
Search our Forums:

Back to Top