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

How to find latest Member of PDS using REXX ?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Wed Nov 01, 2006 7:58 am
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: 1353
Location: Israel

PostPosted: Wed Nov 01, 2006 1:18 pm
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
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

Global Moderator


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

PostPosted: Fri Nov 03, 2006 2:55 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top