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 find the current day using JCL

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

New User


Joined: 30 Dec 2009
Posts: 1
Location: bangalore

PostPosted: Wed Dec 30, 2009 1:30 pm    Post subject: How to find the current day using JCL
Reply with quote

How to find the day using JCL.

Files are getting created on day basis (sunday ,monday ,tuesday,...etc)

on monday I want to merge the monday's file with sunday's file.

Please help me.
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: Wed Dec 30, 2009 1:40 pm    Post subject:
Reply with quote

/RANT ON
Once more let us clarify exactly what JCL is.

it is Job Control Language.

By itself it does nothing. It is used to invoke the chosen program and to define which datasets are to be used by the DD names associated with the chosen program.

JCL does not have magical powers that solve all problems, JCL is merely the vehicule for telling the processor which program you want it to execute.
/RANT OFF
So maybe if you would care to elaborate on exactly which program you wish to execute, then I'm sure some help will be found.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Wed Dec 30, 2009 4:26 pm    Post subject:
Reply with quote

As you have stated your question, it cannot be done. JCL does not have any date symbolic symbols so you cannot tell Sunday from Wednesday.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Dec 30, 2009 4:41 pm    Post subject:
Reply with quote

Often people decide on some solution(Which can not be actually solution) for some problem and then ask how to achieve that solution.

Rather they should state the problem here. May be people here can give better\ correct\ efficient solutions and the way to achieve that too...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Dec 30, 2009 4:43 pm    Post subject: Reply to: How to find the current day using JCL
Reply with quote

I need to agree with Robert and expat. However, tell us how do you identify files was created on some particular day - do you populate some date-field in the file itself?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Wed Dec 30, 2009 4:51 pm    Post subject:
Reply with quote

Sambhaji, a significant percentage of the postings on this forum are from people who have decided how they're going to solve their problem and want help implementing their chosen solution (whether or not that solution makes sense, is efficient, or even can be done at all). They're usually the ones arguing that they "have" to use X method. While it would be nice if they started posting the problem instead of the problems they're having implementing their solution, I suspect that's not likely to change anytime soon.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1772
Location: Bloomington, IL

PostPosted: Wed Dec 30, 2009 8:50 pm    Post subject: Re: Reply to: How to find the current day using JCL
Reply with quote

Anuj Dhawan wrote:
However, tell us how do you identify files was created on some particular day - do you populate some date-field in the file itself?

The data set label; I can think of a couple-three ways to read it off the top of my head.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10292
Location: italy

PostPosted: Wed Dec 30, 2009 9:15 pm    Post subject: Reply to: How to find the current day using JCL
Reply with quote

the best way would be to use Your scheduler variable substitution facility,
speak to Your support.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Dec 30, 2009 10:25 pm    Post subject:
Reply with quote

Quote:
the best way would be to use Your scheduler variable substitution facility,


I agree on this Enrico.

It is too site specific but we do have similar thing at our shop. We use CA7.
We have 7 different schedule id running for all days of week from 11 through 17
Code:

#JI,ID=11                             
//PROC0010 EXEC MYPROC,DAY=MON       
#JI,ID=12                             
//PROC0010 EXEC MYPROC,DAY=TUE       
#JI,ID=13                             
//PROC0010 EXEC MYPROC,DAY=WED       
#JI,ID=14                             
//PROC0010 EXEC MYPROC,DAY=THU       
#JI,ID=15                             
//PROC0010 EXEC MYPROC,DAY=FRI       
#JI,ID=16                             
//PROC0010 EXEC MYPROC,DAY=SAT       
#JI,ID=17                             
//PROC0010 EXEC MYPROC,DAY=SUN       
#JEND                                 
//*                                   

Here DAY symbolic parameter gets value based on Schedule ID
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Wed Dec 30, 2009 11:20 pm    Post subject:
Reply with quote

If you're running CA-7, you can use their CARPROC to create symbolic variables including DAY (which is the day of the week). If the original post had mentioned CA-7, instead of just JCL, the issue would be resolved by now.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Dec 31, 2009 10:08 am    Post subject:
Reply with quote

Quote:
If the original post had mentioned CA-7, instead of just JCL, the issue would be resolved by now.

How are our psychic abilities supposed to be kept sharp then? icon_lol.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Dec 31, 2009 3:46 pm    Post subject:
Reply with quote

Akatsukami - the way question is stated, I'd like to stay on safe side and during this year-end would not like to sound psychic to understand the question - before I could suggest something nice, I wanted to understand the question first and so the statement... icon_smile.gif

See the responses so far, we're at CA-7 suggestion and we started from JCL... icon_biggrin.gif
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 Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


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