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

Scanning for data in multiple members in a pds


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tjk3030

New User


Joined: 18 Mar 2006
Posts: 22

PostPosted: Fri Mar 07, 2008 8:38 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Mar 07, 2008 10:43 am
Reply with quote

It was a magnificant use of 'etc'
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Mar 07, 2008 10:46 am
Reply with quote

If you are looking for DSN wouldn't it make more sense to search on 'DSN='?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 07, 2008 10:57 am
Reply with quote

Yeah, I think I'm missing the point of stringing the individual records into one long contiguous record.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Mar 07, 2008 12:55 pm
Reply with quote

Don't you have ISPF option 3.14 at your shop ?
Back to top
View user's profile Send private message
tjk3030

New User


Joined: 18 Mar 2006
Posts: 22

PostPosted: Fri Mar 07, 2008 2:06 pm
Reply with quote

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
View user's profile Send private message
tjk3030

New User


Joined: 18 Mar 2006
Posts: 22

PostPosted: Fri Mar 07, 2008 2:07 pm
Reply with quote

They want to know all the dsns, not a specific one.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Fri Mar 07, 2008 2:42 pm
Reply with quote

how do you plan to resolve symbolics in the proc (if those are there)?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Mar 07, 2008 5:58 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top