View previous topic :: View next topic
|
Author |
Message |
kalone
New User
Joined: 11 Jan 2010 Posts: 4 Location: india
|
|
|
|
How to send different PARM values based on any condition to the program in a JCL?
For example :-
If the time is before 12:00 pm, I want to send "A" to some program and if it is past 12:00 , I want to send "B" as a PARM value to that program. How to do it thru JCL only? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
/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, if you might just care to tell us which program you wish the JCL to execute, we might be able to help you
BTW, welcome to the forum |
|
Back to top |
|
|
kalone
New User
Joined: 11 Jan 2010 Posts: 4 Location: india
|
|
|
|
Hi Expat,
Thanks for your prompt response.
This question was asked to me at the time of an interview.
The program is just any cobol program which is supposed to accept some values passed by a JCL.We can use the IF- ELSE condition in JCL to conditionally execute the steps which are passing the PARM values.But the tricky part is how to know the time ?We are not supposed to use any other program to check the TIME (before or after 12:00 pm).Thru JCL how can we get the system time ? |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
kalone wrote: |
Hi Expat,
Thanks for your prompt response.
This question was asked to me at the time of an interview.
The program is just any cobol program which is supposed to accept some values passed by a JCL.We can use the IF- ELSE condition in JCL to conditionally execute the steps which are passing the PARM values.But the tricky part is how to know the time ?We are not supposed to use any other program to check the TIME (before or after 12:00 pm).Thru JCL how can we get the system time ? |
Use symbolic name to pass in param and Talk to yourJOB scheduling people and tell your condition. |
|
Back to top |
|
|
|