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
 

 

Generate a PDS member name dynamically using Curr &Prev

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Senthilraj

New User


Joined: 26 Jun 2009
Posts: 4
Location: Chennai, India

PostPosted: Tue Sep 29, 2009 1:52 pm    Post subject: Generate a PDS member name dynamically using Curr &Prev
Reply with quote

I have a PDS HIGHLVL.MIDLVL.LOWLVL. I have 3 members in this. CALE085S, CALE095S and CALE105S. Here the highlighted numbers are previous, current and next year values. I have to browse the current year and previous year member in my JCL.

This year I will need to browse HIGHLVL.MIDLVL.LOWLVL(CALE095S) and HIGHLVL.MIDLVL.LOWLVL(CALE105S).

Next year I will need to browse HIGHLVL.MIDLVL.LOWLVL(CALE105S) and HIGHLVL.MIDLVL.LOWLVL(CALE115S).

I have to pass the members HIGHLVL.MIDLVL.LOWLVL(CALE105S) & HIGHLVL.MIDLVL.LOWLVL(CALE115S) to my program as input files.

What is the best way to achieve this in JCL.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Sep 29, 2009 2:10 pm    Post subject: Reply to: Generate a PDS member name dynamically using Curr
Reply with quote

You have a typo in Your post...
the text says current and previous but the member names specify 09 and 10
will the cutover be on a fixed day ??

on dec 31, 2009 ...
prev 2008 curr 2009 nex 2010

on jan 01, 2010
prev 2009 curr 2010 next 2011

a smart trick would be to use a member alias
define three member aliases pointing
<prev> ==> CALE085S
<curr> ==> CALE095S
<next> ==> CALE105S.

the jcl will stay unchanged forever
//dd1 dd disp=shr,dsn=datasetname(<prev>)
//dd2 dd disp=shr,dsn=datasetname(<curr>)
//dd3 dd disp=shr,dsn=datasetname(<next>)
the jcl would be unaffected

just before starting the new year cycle, every year You should define the new aliases
after the dec 31 job cycle and before the jan 01 just redefine
<prev> ==> CALE095S
<curr> ==> CALE105S
<next> ==> CALE115S.

or, as an alternative work with Your scheduler support to use scheduler variables

with my proposal You can run the jobs outside the scheduler
Back to top
View user's profile Send private message
Senthilraj

New User


Joined: 26 Jun 2009
Posts: 4
Location: Chennai, India

PostPosted: Tue Sep 29, 2009 3:14 pm    Post subject: Reply to: Generate a PDS member name dynamically using Curr
Reply with quote

Hi Enrico,

Thanks for your response.

Though I am aware that using aliases would be the easiest way to do this, I am trying to avoid editing the JCL every year. I am looking at having the year being appended automatically into the member name during each run.

As per my requirement, we have a calendar schedule available in a PDS for previous, current and next year. I have a job that runs everyday to read the current year calendar and do some processing. There is another job which executes at the end of each year to calculate some processing for next year. So I thought, if I am able to somehow get the year dynamically, I would use datasetname(CALE&YY.5S) in the daily job.

Also, through a program, if I calculate and write the member name into a PS file, is it possible to use that file as reference in the PDS member name?

And yes, the daily and yearly jobs are run through Ca7 scheduler.

Thanks,
Senthil Raj.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Sep 29, 2009 3:49 pm    Post subject: Reply to: Generate a PDS member name dynamically using Curr
Reply with quote

Quote:
I am trying to avoid editing the JCL every year.


You are not editing the jcl, You simply change the alias
facin the same update issue You have for the scheduler variables

You can run the alias change at the same time You setup the new scheduler variables

most of the time the date related variables expecially at year end/beginning cannot depend on the real date
the year end/beginning window is usually longer than the daily window

most often happens that on jan 2 You have to run jobs where the <current> year is the preceeding one
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


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