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
 

 

Sending different PARM values to a program based on some co

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Sending different PARM values to a program based on some co
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 29, 2010 2:20 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, 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    Post subject: Reply to: Sending different PARM values to a program based o
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    Post subject: Re: Reply to: Sending different PARM values to a program bas
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 3 Mon May 29, 2017 8:10 pm
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm


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