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 BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 1 Tue Jul 25, 2017 12:12 am
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm


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