What is positional parameter and keyword parameter and what is the difference between them?

Showing Answers 1 - 6 of 6 Answers

Mazhar9

  • Dec 28th, 2007
 

Positional parameters should come in an order...and key word parametes can come in any order....

Positional ParametersA positional parameter must be placed in a specific position within the operand field. (If you want to omit a positional parameter, you must replace that parameter with a comma.)


Example
: //U99999A JOB (*),’Mazhar’


In this example, the two positional parameters are separated by a comma. The first parameter, (*), allows the system to determine accounting information from the TSO logon userid. (Accounting information is always positioned as the first parameter following the job name field.) The second parameter, 'Mazhar', is the user’s name.

here if you dont want to use the user name and want to code CLASS parameter like then u need to leave a comma like this

//U99999A JOB (*),,CLASS=A  << Observe two commas after (*)


Keyword ParametersKeyword parameters have no special position or order within the operand field. However, they follow any required positional parameters within a job statement. A keyword is entered followed by an equal sign and a value.

Example:

TIME=(1,30)

This parameter contains the keyword, TIME, followed by an equal sign and two values in parentheses. (This example instructs the computer that the CPU should not process the job for longer than one minute and 30 seconds.)

  Was this answer useful?  Yes

anandavel

  • Oct 29th, 2011
 

positional parameters are mentioned by their positions and they came before keyword parameters... positional parameters have only locations.. keyword parameters have keyword , equal sign(=) and information..

  Was this answer useful?  Yes

Gautam kumar

  • Nov 10th, 2011
 

Positional Parameters are:-

a).Sequence predetermined b) Parameters separated by commas c) Omitted parameters must be indicated by two consecutive commas. d) Installation dependent

EX: //JOBNAME JOB (DIS, TRG.TRGGLO.NL.BATCH), ‘PGM1)
//SETP01 EXEC PGM=MYPROG

Keyword parameters are Predetermined words are referred to as key word Parameters. Any sequence is permitted, separated by commas. Follow positional parameters.

EX: //JOBNAME JOB (DIS, TRG, N1, BATCH),MSGLEVEL=(1,1),
// MSGCLASS=X, NOTIFY=QZ6P03T, TYPRUN=SCAN

  Was this answer useful?  Yes

Gunesh Asatkar

  • Feb 13th, 2013
 

Position parameter has specific order in a program ,if you want to skip particular parameter then you must type comma for that.It always follow JCL job statement.
keyword parameter is unlike positional parameter it can be codec any order.

  Was this answer useful?  Yes

Ashish

  • Feb 28th, 2018
 

M1[&Arg1,&Arg2,&Arg3] i.e marco declaration
{
ADD1 , &Arg1
ADD2 , &Arg2
ADD3 , &Arg3
}
MEND
M1 [DATA1 , DATA2 , DATA3 ] .

Syntax to use positional arguments
&Arg-Name,
Eg. &Arg1,

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions