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

How to find the current day using JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8796
Location: Welsh Wales

PostPosted: Wed Dec 30, 2009 1:40 pm
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 30, 2009 4:26 pm
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
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

Superior Member


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

PostPosted: Wed Dec 30, 2009 4:43 pm
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 30, 2009 4:51 pm
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: 1787
Location: Bloomington, IL

PostPosted: Wed Dec 30, 2009 8:50 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Dec 30, 2009 9:15 pm
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
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 30, 2009 11:20 pm
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: 1248
Location: Richfield, MN, USA

PostPosted: Thu Dec 31, 2009 10:08 am
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

Superior Member


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

PostPosted: Thu Dec 31, 2009 3:46 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts sort to find out the char which repea... Mainframe Interview Questions 10
No new posts Compare 2 alphabets in a REXX and fin... CLIST & REXX 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts Changeman - how can we know the curr... Compuware & Other Tools 2
Search our Forums:

Back to Top