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

Sending different PARM values to a program based on some co


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalone

New User


Joined: 11 Jan 2010
Posts: 4
Location: india

PostPosted: Thu Apr 29, 2010 2:18 pm
Reply with quote

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? icon_eek.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 29, 2010 2:20 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, 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 icon_biggrin.gif
Back to top
View user's profile Send private message
kalone

New User


Joined: 11 Jan 2010
Posts: 4
Location: india

PostPosted: Thu Apr 29, 2010 2:31 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


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

PostPosted: Thu Apr 29, 2010 2:44 pm
Reply with quote

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
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
Search our Forums:

Back to Top