View previous topic :: View next topic
|
Author |
Message |
tjk3030
New User
Joined: 18 Mar 2006 Posts: 22
|
|
|
|
Here's a good one. My boss wants me to write something to scan our proc pds and find all the DSNs with a disp=(new,etc) or disp=(,etc etc). The goal is to find dsn that are in multiple procs etc.
One though I had was to somewhow take each member in a pds, and string together all the lines into a single record, then scan thru the record.
For example if the member contains 20 lines, string together the 20 lines into one record and then scan the record etc.
So if the pds contains 10 members, each with 20 lines, I wouldhad have 10 records, each with a length of 1600 (20 lines * 80 characters)
Dont have a clue on how to do it???
Any suggestions? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
It was a magnificant use of 'etc' |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
If you are looking for DSN wouldn't it make more sense to search on 'DSN='? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Yeah, I think I'm missing the point of stringing the individual records into one long contiguous record. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Don't you have ISPF option 3.14 at your shop ? |
|
Back to top |
|
|
tjk3030
New User
Joined: 18 Mar 2006 Posts: 22
|
|
|
|
The goal is to find all the all of the datasets created (actually there's more he'll want, i'm sure) in our jcl libs. The jcl in our shop is not tightly controlled, typically the DSN= is on one line, the disp= on another but then again maybe not. So my thinking was if I could have all the contents of a proc in one record, I'd scan that record, find the "DSN=" characters save the DSN, then keep scanning till I hit the "disp=" characters, save the disposition & process each record.
I already have a bunch of jcl I use to scan data records to find combinations of fields etc, so I'd just need to enter the things I'm looking for. So I was hoping someone might have something that would string together all the lines for each PDS member into a separate record. I'd scan the record.
Ultimately I'd end up with a file of all the datasets, dispositions for each proc, then I could mine that file for all the questions, I just know they are going to ask:
1. Show me all the procs where dsns are created.
2. Show me all the procs a dsn participates in.
It would be easy enough if they would tell me the specific dsn but they want a summary of all our dsns, approx 75K worth.
On the lighter side, I suggested isnt there a tool somewhere that would do that? My boss said you are the tool - figure it out. Shouldnt be hard. |
|
Back to top |
|
|
tjk3030
New User
Joined: 18 Mar 2006 Posts: 22
|
|
|
|
They want to know all the dsns, not a specific one. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
how do you plan to resolve symbolics in the proc (if those are there)? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Don't know how useful this will be, but the SMF type 14 records record all data reads, and type 15 all writes.
I can not recall - but will take a look at the manual if I get a chance - if the PROCname / PROCstep are recorded.
UPDATE Unfortunately not, but I am sure that I might have a bit of SAS code offline at home that may help you do this. I will take a look at it over the weekend. |
|
Back to top |
|
|
|