View previous topic :: View next topic
|
Author |
Message |
tomrsan
New User
Joined: 15 Oct 2005 Posts: 13 Location: chennai
|
|
|
|
hi
can anyone explain me the differencce between the parm and sysin statement? |
|
Back to top |
|
|
balaji81_k
Active User
Joined: 29 Jun 2005 Posts: 155
|
|
|
|
hai ,
to me sysin in which the inputs canbe made to dummy,at runtime only
it will use but
parm we can use both at run time as well during compilation. the values cannot be made dummy. |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi tomrsan,
Check out the answer for your query.
The two techniques use to pass information (a Parameter) from JCL to a program are as follows.
Technique
via PARM= This technique uses a PARM=parameter keyword on the EXEC statement in JCL. The COBOL program requires a LINKAGE SECTION.
via SYSIN This technique requires SYSIN statement followed by the parameter to be placed in the JCL. The COBOL program requires an "ACCEPT parameter from SYSIN" to be coded in the COBOL program. If the SYSIN statement is missing in the JCL the ACCEPT will ABEND with a "File not found" message. To avoid this it will be necessary to use a "//SYSIN DD DUMMY" statment in the JCL when a parameter is not being passed.
Passing a Parameter via PARM=
To pass a parameter from JCL to a program requires the use of the "PARM=" keyword with the EXEC statement. The following JCL statement shows an EXEC statement without a parameter defined.
Quote: |
//* *******************************************************************
//* Step 1 of 2, Execute the COBOL program without a parameter.
//*
//CBLPARS1 EXEC PGM=CBLPARC1 |
The following JCL statement shows an EXEC statement with a parameter defined by using the "PARM=" keyword. Notice the comma immediately after the program name. The parameter following the "PARM=" keyword requires the apostophes if the text string contains space characters.
Quote: |
//* *******************************************************************
//* Step 2 of 2, Execute the COBOL program with a parameter.
//*
//CBLPARS2 EXEC PGM=CBLPARC1,
// PARM='Smart work will give you success' |
Passing a Parameter via SYSIN
To pass a parameter from SYSIN to a program requires the use of DD statement for SYSIN. The following JCL statement is required if no parameter is passed.
Quote: |
//* *******************************************************************
//* Step 1 of 2, Execute the COBOL program without a parameter.
//*
//SYSIN DD DUMMY |
The following JCL statements show what is required to pass information via SYSIN.
Quote: |
//* *******************************************************************
//* Step 2 of 2, Execute the COBOL program with a parameter.
//*
//SYSIN DD *
Parameter from SYSIN...
//* |
The following shows the COBOL statement required.
ACCEPT variable-name FROM SYSIN
Hope this helps. |
|
Back to top |
|
|
tomrsan
New User
Joined: 15 Oct 2005 Posts: 13 Location: chennai
|
|
|
|
hi ramya
can u explain both in batch and online plsssssssss, other than the file aid method
urs |
|
Back to top |
|
|
|