View previous topic :: View next topic
|
Author |
Message |
namashlr Currently Banned New User
Joined: 27 Aug 2006 Posts: 5
|
|
|
|
Hi,
if we pass the value from jcl to cobol through sysin dd *,how the passing values accept in cobol program.
let me know ...... |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
The COBOL program would use the ACCEPT statement to accept the data from the SYSIN DD to a section of WORKING-STORAGE.
Ex.
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. MYPROG.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
...
WORKING-STORAGE SECTION.
01 INPUT-PARAMETER PIC X(254).
...
PROCEDURE DIVISION.
ACCEPT INPUT-PARAMETER FROM SYSIN.
...
|
|
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
just to add..
when you pass data thru SYSIN....u can handle the data thru ACCEPT statement in the Cobol code.
If you pass data as PARM, the parm data can be handled using the linkage declaretion.
~Vamsi |
|
Back to top |
|
|
babu kota
New User
Joined: 20 Sep 2006 Posts: 1
|
|
|
|
can you post the JCL syntax for passing values to cobol |
|
Back to top |
|
|
gayathrieka
New User
Joined: 27 Sep 2006 Posts: 1
|
|
|
|
in cobol, if u have statements like below,
ACCEPT A.
ACCEPT B.
then in jcl, the values are passed as
//SYSIN DD *
12
15
/*
// |
|
Back to top |
|
|
|