Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to find latest Member of PDS using REXX ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
mishra_stlouis

New User


Joined: 14 Jul 2006
Posts: 3
Location: st louis

PostPosted: Wed Nov 01, 2006 3:16 am    Post subject: How to find latest Member of PDS using REXX ?
Reply with quote

I am a newbie in REXX,so please bear with me if i am asking something stupid.
I have a situation where my JCL is triggered on weekly basis on mondays. This JCL has overriding steps for job Procedure called within the JCL. The JCL overrides a PDS name along with the latest member in the job procedure.

For e.g.
Code:
********************************************
//KAT400   EXEC KY030A1A,USERID=BPAA                             
//KY028S2.USOCDESC DD DSN=ML1182.MEL.MASTER(M0609),DISP=SHR       
//KY029S4.USOCDESC DD DSN=ML1182.MEL.STATUS(S0610),DISP=SHR       
//GENERS7.SYSUT1   DD DSN=BPAA.RATING.KAD10R1.KAT400.UNLD.WEEKLY,
//        DISP=SHR                                               
*********************************************
As you can see here ML1182.MEL.MASTER(M0609) is overriding in PROC.
the member M0609 gets replaced weekly by a new member.
In order for job to pickup the latest member i have to manually open the PDS , look at the latest member name and update the job with latest member name.
Is there a way i can automate this process so that i dont have to manually open and update the JCL with newest member.
Is it possible in REXX?
Or if there's some other way of doing it?
Any kind of help is most welcome..
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Wed Nov 01, 2006 7:58 am    Post subject: Re: How to find latest Member of PDS using REXX ?
Reply with quote

What is the criteria used to determine the latest member name? Is it something you can determine by looking at the ISPF statistics for the PDS? Can't you keep a running log of the member list from the last run, look at a member list from the new run, and exclude all of the duplicate member names, leaving behind only that member or members added since the last run?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Wed Nov 01, 2006 1:18 pm    Post subject:
Reply with quote

Can you ask the people creating the M0609, M0610, M0611... members to create/override a member named LATEST as well:
on week 1, LATEST will be equal to M0609,
on week 2, LATEST will be equal to M0610,
and so on.
Like this, your JCL will need only to access the LATEST member.
Back to top
View user's profile Send private message
mishra_stlouis

New User


Joined: 14 Jul 2006
Posts: 3
Location: st louis

PostPosted: Thu Nov 02, 2006 3:44 am    Post subject:
Reply with quote

Superk
The criteria to decide the latest member name is based on the creation date of the member. And also it follows a naming pattern. For e.g. M0610 will follow M0609 and so on.
I didnt understand what you mean to say to keep a running log? Howz the possible unless i save that information in a file or something and read it for excluding all other member except the one which dont want to. Pleae remember we are overriding a PDS member name.

I know that making it a GDG will be the simplest way to resolving the issue.But this file comes from a remote site for which i have no control.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri Nov 03, 2006 2:55 am    Post subject: Re: How to find latest Member of PDS using REXX ?
Reply with quote

OK, how about this?

At the end of the job, copy the entire contents of the PDS to another PDS.

Before the next run, run the Super-C compare utility to compare the updated PDS to the other PDS. Super-C will show any member(s) that are new. Extract the name of the new member from the output listing and use that in the next run of the job.
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us