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

How to Check the DSN statement?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Alex-L

New User


Joined: 07 Apr 2010
Posts: 1
Location: USA

PostPosted: Thu Apr 08, 2010 10:39 pm
Reply with quote

Hi,
I had a PDS which contain JCL/PROC. (More than 1000 members there)My manager assigned a job to me that I have to check every proc DSN statement and change first qualifier to different info, same way different changes I have do. After all the changes the PDS member name has to be changed first 2 characters to different 2 characters. I am actually a COBOL programmer. I don’t know REXX or CLIST. If anyone can help me please help ASAP.
Thank you in advance. icon_question.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Apr 08, 2010 10:54 pm
Reply with quote

sorry but ...
we do not do ASAP
we do not provide code designed for Your requirements/specifications

but...
we try to help You find glitches in Your code
we might provide code that has been tested in our environment for our requirements/specifications
as a sample on how to achieve similar results

it' s up to You to understand the code and modify it according to Your requirements/specifications

here is a link to
a rexx macro to apply another macro to all the members of a pds
ibmmainframes.com/viewtopic.php?t=25947&highlight=
a rexx jcl analyzer/reformatter I wrote
ibmmainframes.com/viewtopic.php?t=32494&highlight=jcl+parser
not written as an edit macro, but easy to port
at the build-DD label process the dsname carrying on any required transformation
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 08, 2010 11:28 pm
Reply with quote

Hello and welcome to the forum,

Whether you choose to try to automate this or do this manually, suggest you first make a complete copy of the original pds. If you intend to automate some/all of this, suggest you then a make a second copy to test the automated tool(s). It would be better to stay completely out of the "real" pds until your process is validated.

When the time comes to make the changes to the "real" pds, have a backup copy taken before applyting any of the changes.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Apr 09, 2010 11:47 am
Reply with quote

Click HERE to see a basic start point for what you require.

There is code to process every member of a PDS, although you will need to change the ISPF EDIT macro to suit your needs. Not too difficult as it is basically the same commands that you would type on a panel.

You will also need to research ISPF in batch, but this has been covered many times on the forum.

It is a good starting point, and obviously if you have problems please post and we will try to help.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri Apr 09, 2010 1:15 pm
Reply with quote

Alex,

Welcome to the forum.

As a cobol programmer, you certainly have had little interaction (programmatically speaking) with the Operating System.
In your rexx program, you will have to talk to ISPF and to TSO.
So in addition to learning rexx, you'll have to learn how to address these products.

Here is an interesting link

Your program need some inputs and outputs, and their access is different than in cobol.
For example, you need to:
- get a list of all the members in the PDS
- for each member: launch the editor with a macro
(that's now 2 rexx: one small program and one macro)
in the macro you need to:
- change the string
- keep a log
- save and close the session
(for each of these things, you can search the forum)

Write first the macro, without the last part, and test it on a member (edit and run macro manually).
Once it's debugged and working, add the save and end, test again.
Then move on to the program. Instead of testing "for each member", limit your loop to 1 member only,
Then test a small amount. Keep an eye on your watch, it may take some time.

You can run your progam online or in a batch job, just as any TSO command.
Before you can test your macro or program, the library they are in must be allocated (among others) to the SYSPROC and SYSEXEC.
Each site has its own policy and way to allow this, you will have to get the information "in-house".

Some rexx tips:
- use 'trace" for debugging.
- use indentation
- don't be tempted to name your variables 'x' or 'aaa' or 'var1'
use real names just like in cobol.

Last thing: read these books: for the macro, for ISPF and for REXX
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts How to check whether who renamed the ... JCL & VSAM 3
No new posts No ++JCLIN, APPLY CHECK job JCL & VSAM 1
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
Search our Forums:

Back to Top