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
 

 

How to Check the DSN statement?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to Check the DSN statement?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Apr 08, 2010 10:54 pm    Post subject: Reply to: How to Check the DSN statement?
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
http://ibmmainframes.com/viewtopic.php?t=25947&highlight=
a rexx jcl analyzer/reformatter I wrote
http://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

Site Director


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

PostPosted: Thu Apr 08, 2010 11:28 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 09, 2010 11:47 am    Post subject:
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: 1232
Location: Israel

PostPosted: Fri Apr 09, 2010 1:15 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 1 Tue Jul 25, 2017 1:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm


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